mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Use SDL_GetRendererOutputSize instead of SDL_GetWindowSize
SDL_GetRendererOutputSize will always return the actual size, even in some obscure HiDPI/macOS cases.
This commit is contained in:
parent
d9fff2a8c3
commit
46d8599f62
1 changed files with 2 additions and 2 deletions
|
@ -170,7 +170,7 @@ void Screen::ResizeScreen(int x, int y)
|
|||
if (stretchMode == 1)
|
||||
{
|
||||
int winX, winY;
|
||||
SDL_GetWindowSize(m_window, &winX, &winY);
|
||||
SDL_GetRendererOutputSize(m_renderer, &winX, &winY);
|
||||
int result = SDL_RenderSetLogicalSize(m_renderer, winX, winY);
|
||||
if (result != 0)
|
||||
{
|
||||
|
@ -256,7 +256,7 @@ void Screen::ResizeToNearestMultiple()
|
|||
|
||||
void Screen::GetWindowSize(int* x, int* y)
|
||||
{
|
||||
SDL_GetWindowSize(m_window, x, y);
|
||||
SDL_GetRendererOutputSize(m_renderer, x, y);
|
||||
}
|
||||
|
||||
void Screen::UpdateScreen(SDL_Surface* buffer, SDL_Rect* rect )
|
||||
|
|
Loading…
Reference in a new issue