mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
Fixed sending a size event while setting up a window (fix for DOTA 2 on Source 2)
This commit is contained in:
parent
c5e68d68e7
commit
9bd640e1a0
@ -735,7 +735,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||||||
int x, y;
|
int x, y;
|
||||||
int w, h;
|
int w, h;
|
||||||
|
|
||||||
if (data->in_border_change) {
|
if (data->initializing || data->in_border_change) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,6 +130,7 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created)
|
|||||||
data->created = created;
|
data->created = created;
|
||||||
data->mouse_button_flags = 0;
|
data->mouse_button_flags = 0;
|
||||||
data->videodata = videodata;
|
data->videodata = videodata;
|
||||||
|
data->initializing = SDL_TRUE;
|
||||||
|
|
||||||
window->driverdata = data;
|
window->driverdata = data;
|
||||||
|
|
||||||
@ -255,6 +256,8 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created)
|
|||||||
/* Enable dropping files */
|
/* Enable dropping files */
|
||||||
DragAcceptFiles(hwnd, TRUE);
|
DragAcceptFiles(hwnd, TRUE);
|
||||||
|
|
||||||
|
data->initializing = SDL_FALSE;
|
||||||
|
|
||||||
/* All done! */
|
/* All done! */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,7 @@ typedef struct
|
|||||||
WNDPROC wndproc;
|
WNDPROC wndproc;
|
||||||
SDL_bool created;
|
SDL_bool created;
|
||||||
WPARAM mouse_button_flags;
|
WPARAM mouse_button_flags;
|
||||||
|
SDL_bool initializing;
|
||||||
SDL_bool expected_resize;
|
SDL_bool expected_resize;
|
||||||
SDL_bool in_border_change;
|
SDL_bool in_border_change;
|
||||||
SDL_bool in_title_click;
|
SDL_bool in_title_click;
|
||||||
|
Loading…
Reference in New Issue
Block a user