Skip to content

Commit 7d16e4c

Browse files
committed
[libretro] Improve maximum scren res. #101
1 parent e95c2c2 commit 7d16e4c

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

platforms/libretro/libretro.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ static const char slash = '/';
3939
#define MAX_PADS GG_MAX_GAMEPADS
4040
#define MAX_BUTTONS 14
4141

42+
#define MAX_SCREEN_WIDTH 1120
43+
#define MAX_SCREEN_HEIGHT 242
44+
4245
static retro_environment_t environ_cb;
4346
static retro_video_refresh_t video_cb;
4447
static retro_audio_sample_t audio_cb;
@@ -274,8 +277,8 @@ void retro_get_system_av_info(struct retro_system_av_info *info)
274277
{
275278
info->geometry.base_width = runtime_info.screen_width;
276279
info->geometry.base_height = runtime_info.screen_height;
277-
info->geometry.max_width = 2048;
278-
info->geometry.max_height = 512;
280+
info->geometry.max_width = MAX_SCREEN_WIDTH;
281+
info->geometry.max_height = MAX_SCREEN_HEIGHT;
279282
info->geometry.aspect_ratio = aspect_ratio == 0.0f ? (float)runtime_info.screen_width / (float)runtime_info.screen_height / (float)runtime_info.width_scale : aspect_ratio;
280283
info->timing.fps = 59.82;
281284
info->timing.sample_rate = 44100.0;
@@ -309,8 +312,8 @@ void retro_run(void)
309312
retro_system_av_info info;
310313
info.geometry.base_width = runtime_info.screen_width;
311314
info.geometry.base_height = runtime_info.screen_height;
312-
info.geometry.max_width = runtime_info.screen_width;
313-
info.geometry.max_height = runtime_info.screen_height;
315+
info.geometry.max_width = MAX_SCREEN_WIDTH;
316+
info.geometry.max_height = MAX_SCREEN_HEIGHT;
314317
info.geometry.aspect_ratio = (aspect_ratio == 0.0f ? ((float)runtime_info.screen_width / (float)runtime_info.width_scale) / (float)runtime_info.screen_height : aspect_ratio);
315318

316319
environ_cb(RETRO_ENVIRONMENT_SET_GEOMETRY, &info.geometry);
@@ -361,6 +364,8 @@ bool retro_load_game(const struct retro_game_info *info)
361364

362365
load_mb128();
363366

367+
core->GetRuntimeInfo(runtime_info);
368+
364369
return true;
365370
}
366371

0 commit comments

Comments
 (0)