add in High DPI support (aka Retina)
- based on Jørgen's patch with a few bug fixes
This commit is contained in:
parent
a449178caa
commit
3a11d95444
12 changed files with 134 additions and 11 deletions
|
@ -27,7 +27,7 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#define VIDEO_USAGE \
|
||||
"[--video driver] [--renderer driver] [--gldebug] [--info all|video|modes|render|event] [--log all|error|system|audio|video|render|input] [--display N] [--fullscreen | --fullscreen-desktop | --windows N] [--title title] [--icon icon.bmp] [--center | --position X,Y] [--geometry WxH] [--min-geometry WxH] [--max-geometry WxH] [--logical WxH] [--scale N] [--depth N] [--refresh R] [--vsync] [--noframe] [--resize] [--minimize] [--maximize] [--grab]"
|
||||
"[--video driver] [--renderer driver] [--gldebug] [--info all|video|modes|render|event] [--log all|error|system|audio|video|render|input] [--display N] [--fullscreen | --fullscreen-desktop | --windows N] [--title title] [--icon icon.bmp] [--center | --position X,Y] [--geometry WxH] [--min-geometry WxH] [--max-geometry WxH] [--logical WxH] [--scale N] [--depth N] [--refresh R] [--vsync] [--noframe] [--resize] [--minimize] [--maximize] [--grab] [--allow-hidpi]"
|
||||
|
||||
#define AUDIO_USAGE \
|
||||
"[--rate N] [--format U8|S8|U16|U16LE|U16BE|S16|S16LE|S16BE] [--channels N] [--samples N]"
|
||||
|
@ -194,6 +194,10 @@ SDLTest_CommonArg(SDLTest_CommonState * state, int index)
|
|||
state->num_windows = 1;
|
||||
return 1;
|
||||
}
|
||||
if (SDL_strcasecmp(argv[index], "--allow-highdpi") == 0) {
|
||||
state->window_flags |= SDL_WINDOW_ALLOW_HIGHDPI;
|
||||
return 1;
|
||||
}
|
||||
if (SDL_strcasecmp(argv[index], "--windows") == 0) {
|
||||
++index;
|
||||
if (!argv[index] || !SDL_isdigit(*argv[index])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue