Skip to content

Commit

Permalink
Upgrade usage of SDL_Metal_GetDrawableSize
Browse files Browse the repository at this point in the history
  • Loading branch information
guusw committed Jul 2, 2024
1 parent 7889545 commit fc3bc06
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions shards/gfx/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,8 @@ void *Window::getNativeWindowHandle() {

int2 Window::getDrawableSize() const {
int2 r;
#if SH_APPLE
SDL_Metal_GetDrawableSize(window, &r.x, &r.y);
#elif SH_ANDROID
SDL_GetWindowSizeInPixels(Window::window, &r.x, &r.y);
#if SH_ANDROID
ANativeWindow *nativeWindow = (ANativeWindow *)SDL_GetNativeWindowPtr(window);
r.x = ANativeWindow_getWidth(nativeWindow);
r.y = ANativeWindow_getHeight(nativeWindow);
Expand Down

0 comments on commit fc3bc06

Please sign in to comment.