fixed cpu burning bug
parent
5b27fa3806
commit
783d1f2fc6
|
@ -1,6 +1,6 @@
|
||||||
#define MAJOR 4
|
#define MAJOR 4
|
||||||
#define MINOR 0
|
#define MINOR 0
|
||||||
#define PATCH 15
|
#define PATCH 16
|
||||||
|
|
||||||
#define VN__(a,b,c) #a"."#b"."#c
|
#define VN__(a,b,c) #a"."#b"."#c
|
||||||
#define VN_(a,b,c) VN__(a,b,c)
|
#define VN_(a,b,c) VN__(a,b,c)
|
||||||
|
|
|
@ -15,9 +15,9 @@ void
|
||||||
default_keys(Bind_Helper *context){
|
default_keys(Bind_Helper *context){
|
||||||
begin_map(context, mapid_global);
|
begin_map(context, mapid_global);
|
||||||
|
|
||||||
//bind(context, 'p', MDFR_CTRL, open_panel_vsplit);
|
bind(context, 'p', MDFR_CTRL, open_panel_vsplit);
|
||||||
//bind(context, '_', MDFR_CTRL, open_panel_hsplit);
|
bind(context, '_', MDFR_CTRL, open_panel_hsplit);
|
||||||
//bind(context, 'P', MDFR_CTRL, close_panel);
|
bind(context, 'P', MDFR_CTRL, close_panel);
|
||||||
bind(context, ',', MDFR_CTRL, change_active_panel);
|
bind(context, ',', MDFR_CTRL, change_active_panel);
|
||||||
|
|
||||||
bind(context, 'n', MDFR_CTRL, interactive_new);
|
bind(context, 'n', MDFR_CTRL, interactive_new);
|
||||||
|
|
|
@ -14,8 +14,7 @@ TYPE: 'internal-for-default-system'
|
||||||
|
|
||||||
HOOK_SIG(default_start){
|
HOOK_SIG(default_start){
|
||||||
default_4coder_initialize(app);
|
default_4coder_initialize(app);
|
||||||
//default_4coder_side_by_side_panels(app);
|
default_4coder_side_by_side_panels(app);
|
||||||
default_4coder_full_width_bottom_side_by_side_panels(app);
|
|
||||||
|
|
||||||
// no meaning for return
|
// no meaning for return
|
||||||
return(0);
|
return(0);
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -500,6 +500,8 @@ get_4coder_dist_name(String *zip_file, i32 OS_specific, char *tier, char *ext){
|
||||||
append_sc (zip_file, ".");
|
append_sc (zip_file, ".");
|
||||||
append_sc (zip_file, ext);
|
append_sc (zip_file, ext);
|
||||||
terminate_with_null(zip_file);
|
terminate_with_null(zip_file);
|
||||||
|
|
||||||
|
slash_fix(zip_file->str);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -1643,6 +1643,7 @@ Win32InitGL(){
|
||||||
HGLRC glcontext = wglCreateContext(dc);
|
HGLRC glcontext = wglCreateContext(dc);
|
||||||
wglMakeCurrent(dc, glcontext);
|
wglMakeCurrent(dc, glcontext);
|
||||||
|
|
||||||
|
#if 1
|
||||||
{
|
{
|
||||||
HMODULE module = LoadLibraryA("opengl32.dll");
|
HMODULE module = LoadLibraryA("opengl32.dll");
|
||||||
|
|
||||||
|
@ -1692,6 +1693,7 @@ Win32InitGL(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
ReleaseDC(win32vars.window_handle, dc);
|
ReleaseDC(win32vars.window_handle, dc);
|
||||||
}
|
}
|
||||||
|
@ -1982,7 +1984,7 @@ Win32Callback(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){
|
||||||
memcpy(data[*count].modifiers, control_keys, control_keys_size);
|
memcpy(data[*count].modifiers, control_keys, control_keys_size);
|
||||||
++(*count);
|
++(*count);
|
||||||
|
|
||||||
result = DefWindowProc(hwnd, uMsg, wParam, lParam);
|
//result = DefWindowProc(hwnd, uMsg, wParam, lParam);
|
||||||
win32vars.got_useful_event = 1;
|
win32vars.got_useful_event = 1;
|
||||||
}break;
|
}break;
|
||||||
|
|
||||||
|
@ -2078,8 +2080,9 @@ Win32Callback(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){
|
||||||
}break;
|
}break;
|
||||||
|
|
||||||
case WM_4coder_ANIMATE:
|
case WM_4coder_ANIMATE:
|
||||||
win32vars.got_useful_event = 1;
|
{
|
||||||
break;
|
win32vars.got_useful_event = 1;
|
||||||
|
}break;
|
||||||
|
|
||||||
case WM_CANCELMODE:
|
case WM_CANCELMODE:
|
||||||
{
|
{
|
||||||
|
@ -2096,11 +2099,7 @@ Win32Callback(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
WinMain(HINSTANCE hInstance,
|
WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){
|
||||||
HINSTANCE hPrevInstance,
|
|
||||||
LPSTR lpCmdLine,
|
|
||||||
int nCmdShow){
|
|
||||||
|
|
||||||
i32 argc = __argc;
|
i32 argc = __argc;
|
||||||
char **argv = __argv;
|
char **argv = __argv;
|
||||||
|
|
||||||
|
@ -2320,12 +2319,7 @@ WinMain(HINSTANCE hInstance,
|
||||||
window_style |= WS_MAXIMIZE;
|
window_style |= WS_MAXIMIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
win32vars.window_handle =
|
win32vars.window_handle = CreateWindowA(window_class.lpszClassName, WINDOW_NAME, window_style, window_x, window_y, window_rect.right - window_rect.left, window_rect.bottom - window_rect.top, 0, 0, hInstance, 0);
|
||||||
CreateWindowA(window_class.lpszClassName, WINDOW_NAME, window_style,
|
|
||||||
window_x, window_y,
|
|
||||||
window_rect.right - window_rect.left,
|
|
||||||
window_rect.bottom - window_rect.top,
|
|
||||||
0, 0, hInstance, 0);
|
|
||||||
|
|
||||||
if (win32vars.window_handle == 0){
|
if (win32vars.window_handle == 0){
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -2428,6 +2422,10 @@ WinMain(HINSTANCE hInstance,
|
||||||
if (!(win32vars.first && win32vars.settings.stream_mode)){
|
if (!(win32vars.first && win32vars.settings.stream_mode)){
|
||||||
system_release_lock(FRAME_LOCK);
|
system_release_lock(FRAME_LOCK);
|
||||||
|
|
||||||
|
if (win32vars.running_cli == 0){
|
||||||
|
win32vars.got_useful_event = false;
|
||||||
|
}
|
||||||
|
|
||||||
b32 get_more_messages = true;
|
b32 get_more_messages = true;
|
||||||
do{
|
do{
|
||||||
if (win32vars.got_useful_event == 0){
|
if (win32vars.got_useful_event == 0){
|
||||||
|
@ -2498,22 +2496,6 @@ WinMain(HINSTANCE hInstance,
|
||||||
TranslateMessage(&msg);
|
TranslateMessage(&msg);
|
||||||
DispatchMessage(&msg);
|
DispatchMessage(&msg);
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
UINT count = 0;
|
|
||||||
INPUT in[1];
|
|
||||||
if (ctrl){
|
|
||||||
in[count].type = INPUT_KEYBOARD;
|
|
||||||
in[count].ki.wVk = VK_CONTROL;
|
|
||||||
in[count].ki.wScan = 0;
|
|
||||||
in[count].ki.dwFlags = KEYEVENTF_KEYUP;
|
|
||||||
in[count].ki.time = 0;
|
|
||||||
in[count].ki.dwExtraInfo = GetMessageExtraInfo();
|
|
||||||
++count;
|
|
||||||
}
|
|
||||||
if(count > 0){
|
|
||||||
SendInput(count, in, sizeof(in));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue