mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-10-12 09:08:23 +03:00
Android: Disable window resizing
Calling SDL_SetWindowSize() will overwrite window->w and window->y and break rendering.
This commit is contained in:
@@ -56,7 +56,9 @@ void sdl_setWindowSize(int x, int y, int w, int h) {
|
||||
view_w = w;
|
||||
view_h = h;
|
||||
|
||||
#ifndef __ANDROID__
|
||||
SDL_SetWindowSize(sdl_window, w, h);
|
||||
#endif
|
||||
SDL_RenderSetLogicalSize(sdl_renderer, w, h);
|
||||
if (sdl_display)
|
||||
SDL_FreeSurface(sdl_display);
|
||||
|
||||
+6
-1
@@ -108,10 +108,15 @@ static void window_init(void) {
|
||||
#endif
|
||||
);
|
||||
|
||||
#ifdef __ANDROID__
|
||||
Uint32 flags = 0;
|
||||
#else
|
||||
Uint32 flags = SDL_WINDOW_RESIZABLE;
|
||||
#endif
|
||||
sdl_window = SDL_CreateWindow("XSystem3.5 Version "VERSION,
|
||||
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
|
||||
SYS35_DEFAULT_WIDTH, SYS35_DEFAULT_HEIGHT,
|
||||
SDL_WINDOW_RESIZABLE);
|
||||
flags);
|
||||
sdl_renderer = SDL_CreateRenderer(sdl_window, -1, 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user