mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-09-27 09:28:06 +03:00
Make window resizable
This commit is contained in:
+1
-1
@@ -31,7 +31,7 @@ int main(int argc, char *argv[])
|
||||
SDL_SetHint(SDL_HINT_ORIENTATIONS, "LandscapeLeft LandscapeRight");
|
||||
Uint32 flags = SDL_WINDOW_FULLSCREEN;
|
||||
#else
|
||||
Uint32 flags = 0;
|
||||
Uint32 flags = SDL_WINDOW_RESIZABLE;
|
||||
#endif
|
||||
g_window = SDL_CreateWindow("Scenario Decoder SYSTEM3", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 400, flags);
|
||||
|
||||
|
||||
@@ -28,6 +28,14 @@ void NACT::pump_events()
|
||||
terminate = true;
|
||||
break;
|
||||
|
||||
case SDL_WINDOWEVENT:
|
||||
switch (e.window.event) {
|
||||
case SDL_WINDOWEVENT_SIZE_CHANGED:
|
||||
ags->flush_screen(false);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case SDL_MOUSEMOTION:
|
||||
mousex = e.motion.x;
|
||||
mousey = e.motion.y;
|
||||
|
||||
Reference in New Issue
Block a user