|
@@ -655,8 +655,42 @@ static bool PS2_CreateRenderer(SDL_Renderer *renderer, SDL_Window *window, SDL_P
|
|
|
|
|
|
gsGlobal = gsKit_init_global_custom(RENDER_QUEUE_OS_POOLSIZE, RENDER_QUEUE_PER_POOLSIZE);
|
|
|
|
|
|
- gsGlobal->Mode = GS_MODE_NTSC;
|
|
|
- gsGlobal->Height = 448;
|
|
|
+ // GS interlaced/progressive
|
|
|
+ if (SDL_GetHintBoolean(SDL_HINT_PS2_GS_PROGRESSIVE, false)) {
|
|
|
+ gsGlobal->Interlace = GS_NONINTERLACED;
|
|
|
+ } else {
|
|
|
+ gsGlobal->Interlace = GS_INTERLACED;
|
|
|
+ }
|
|
|
+
|
|
|
+ // GS width/height
|
|
|
+ gsGlobal->Width = 0;
|
|
|
+ gsGlobal->Height = 0;
|
|
|
+ const char *hint = SDL_GetHint(SDL_HINT_PS2_GS_WIDTH);
|
|
|
+ if (hint) {
|
|
|
+ gsGlobal->Width = SDL_atoi(hint);
|
|
|
+ }
|
|
|
+ hint = SDL_GetHint(SDL_HINT_PS2_GS_HEIGHT);
|
|
|
+ if (hint) {
|
|
|
+ gsGlobal->Height = SDL_atoi(hint);
|
|
|
+ }
|
|
|
+ if (gsGlobal->Width <= 0) {
|
|
|
+ gsGlobal->Width = 640;
|
|
|
+ }
|
|
|
+ if (gsGlobal->Height <= 0) {
|
|
|
+ gsGlobal->Height = 448;
|
|
|
+ }
|
|
|
+
|
|
|
+ // GS region
|
|
|
+ hint = SDL_GetHint(SDL_HINT_PS2_GS_MODE);
|
|
|
+ if (hint) {
|
|
|
+ if (SDL_strcasecmp(SDL_GetHint(SDL_HINT_PS2_GS_MODE), "NTSC") == 0) {
|
|
|
+ gsGlobal->Mode = GS_MODE_NTSC;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (SDL_strcasecmp(SDL_GetHint(SDL_HINT_PS2_GS_MODE), "PAL") == 0) {
|
|
|
+ gsGlobal->Mode = GS_MODE_PAL;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
gsGlobal->PSM = GS_PSM_CT24;
|
|
|
gsGlobal->PSMZ = GS_PSMZ_16S;
|