Phone: turns with the phone (portrait layout), fullscreen, picture the right way up; tap/drag fixes for touch

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NMSrd5oe1GpUD7E6d825KP
This commit is contained in:
Nexoniarz 2026-10-19 23:07:37 +02:00
commit a5e0d2a9eb
5 changed files with 87 additions and 16 deletions

View file

@ -40,7 +40,11 @@ bool Window::init(const char* title, int width, int height, bool opengl) {
log::error("SDL_Init failed: {}", SDL_GetError());
return false;
}
window_ = SDL_CreateWindow(title, width, height, (opengl ? SDL_WINDOW_OPENGL : SDL_WINDOW_VULKAN) | SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIGH_PIXEL_DENSITY);
SDL_WindowFlags flags = (opengl ? SDL_WINDOW_OPENGL : SDL_WINDOW_VULKAN) | SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIGH_PIXEL_DENSITY;
#if defined(__ANDROID__)
flags |= SDL_WINDOW_FULLSCREEN; // (the whole screen: no status or navigation bar over the edges)
#endif
window_ = SDL_CreateWindow(title, width, height, flags);
if (!window_) {
log::error("SDL_CreateWindow failed: {}", SDL_GetError());
return false;