Fix render issue, seems like compositor / set window size interaction gone wrong, it produced maybe framebuffer of wrong size not filling entire screen
This commit is contained in:
@@ -1027,6 +1027,7 @@ int main(int argc, char **argv, char **envp)
|
||||
int hhalf = 1000;
|
||||
int xhalf = 100;
|
||||
int yhalf = 100;
|
||||
Unused(xhalf); Unused(yhalf);
|
||||
#else
|
||||
SDL_DisplayID primary_display_id = SDL_GetPrimaryDisplay();
|
||||
const SDL_DisplayMode *display_mode = SDL_GetCurrentDisplayMode(primary_display_id);
|
||||
@@ -1042,7 +1043,9 @@ int main(int argc, char **argv, char **envp)
|
||||
ReportErrorf("Couldn't create window! %s", SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
#if !OS_LINUX
|
||||
SDL_SetWindowPosition(SDLWindow, xhalf, yhalf);
|
||||
#endif
|
||||
|
||||
SDL_WindowGLContext = SDL_GL_CreateContext(SDLWindow);
|
||||
SDL_GL_MakeCurrent(SDLWindow, SDL_WindowGLContext);
|
||||
@@ -1064,10 +1067,12 @@ int main(int argc, char **argv, char **envp)
|
||||
SDL_StartTextInput(SDLWindow);
|
||||
SDL_SetEventEnabled(SDL_EVENT_DROP_FILE, true);
|
||||
SDL_GL_SetSwapInterval(1); // vsync
|
||||
|
||||
{
|
||||
float scale = SDL_GetWindowDisplayScale(SDLWindow);
|
||||
if (scale != 1.0f) DPIScale = scale;
|
||||
}
|
||||
SDL_SyncWindow(SDLWindow);
|
||||
|
||||
// InitBuffers
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user