|
|
|
|
@ -62,7 +62,11 @@ void InitializeVirtualGamepad()
|
|
|
|
|
if (SDL_GetDisplayDPI(displayIndex, nullptr, &hdpi, &vdpi) == 0) { |
|
|
|
|
int clientWidth; |
|
|
|
|
int clientHeight; |
|
|
|
|
SDL_GetWindowSize(ghMainWnd, &clientWidth, &clientHeight); |
|
|
|
|
if (renderer != nullptr) |
|
|
|
|
SDL_GetRendererOutputSize(renderer, &clientWidth, &clientHeight); |
|
|
|
|
else |
|
|
|
|
SDL_GetWindowSize(ghMainWnd, &clientWidth, &clientHeight); |
|
|
|
|
|
|
|
|
|
hdpi *= static_cast<float>(gnScreenWidth) / clientWidth; |
|
|
|
|
vdpi *= static_cast<float>(gnScreenHeight) / clientHeight; |
|
|
|
|
|
|
|
|
|
|