Skip to content

Commit

Permalink
Merge pull request #94 from RobLoach/patch-1
Browse files Browse the repository at this point in the history
Use SDL_HINT_WINDOWS_DPI_AWARENESS only if it's available
  • Loading branch information
deltabeard authored Sep 14, 2023
2 parents 03c1fcf + 1186546 commit 2d77222
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/sdl2/peanut_sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,9 @@ int main(int argc, char **argv)
SDL_LogSetPriority(LOG_CATERGORY_PEANUTSDL, SDL_LOG_PRIORITY_INFO);

/* Enable Hi-DPI to stop blurry game image. */
#ifdef SDL_HINT_WINDOWS_DPI_AWARENESS
SDL_SetHint(SDL_HINT_WINDOWS_DPI_AWARENESS, "permonitorv2");
#endif

/* Initialise frontend implementation, in this case, SDL2. */
if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER | SDL_INIT_AUDIO) < 0)
Expand Down

0 comments on commit 2d77222

Please sign in to comment.