mirror of
https://github.com/libretro/mame2003-libretro.git
synced 2024-11-27 10:31:10 +00:00
Merge pull request #68 from dankcushions/tatemode
Added TATE mode core option. Corrects aspect ratio for users who rota…
This commit is contained in:
commit
6fcd8cd15e
@ -53,6 +53,8 @@ Generates directories as it requires:
|
|||||||
Some dial/spinner hardware are actually one device with one axis for each player. This supports that setup, by breaking down the normal mouse x/y into two seperate inputs.
|
Some dial/spinner hardware are actually one device with one axis for each player. This supports that setup, by breaking down the normal mouse x/y into two seperate inputs.
|
||||||
* **Mouse Device** (mouse/pointer/disabled)
|
* **Mouse Device** (mouse/pointer/disabled)
|
||||||
Switch between mouse (e.g. hardware mouse, trackball, etc), pointer (touchpad, touchscreen, lightgun, etc), or disabled.
|
Switch between mouse (e.g. hardware mouse, trackball, etc), pointer (touchpad, touchscreen, lightgun, etc), or disabled.
|
||||||
|
* **TATE Mode** (disabled/enabled)
|
||||||
|
Enable if rotating display for vertically oriented games (Pac-Man, Galaga, etc). Requires `video_allow_rotate = "false"` cfg setting in RetroArch.
|
||||||
|
|
||||||
### To-do:
|
### To-do:
|
||||||
* Make sure all of the mkdir commands in makefile complete before any compiling starts.
|
* Make sure all of the mkdir commands in makefile complete before any compiling starts.
|
||||||
|
@ -60,6 +60,7 @@ void retro_set_environment(retro_environment_t cb)
|
|||||||
{ "mame2003-mouse_device", "Mouse Device; mouse|pointer|disabled" },
|
{ "mame2003-mouse_device", "Mouse Device; mouse|pointer|disabled" },
|
||||||
#endif
|
#endif
|
||||||
{ "mame2003-rstick_to_btns", "Right Stick to Buttons; enabled|disabled" },
|
{ "mame2003-rstick_to_btns", "Right Stick to Buttons; enabled|disabled" },
|
||||||
|
{ "mame2003-tate_mode", "TATE Mode; disabled|enabled" },
|
||||||
{ NULL, NULL },
|
{ NULL, NULL },
|
||||||
};
|
};
|
||||||
environ_cb = cb;
|
environ_cb = cb;
|
||||||
@ -168,23 +169,6 @@ void retro_get_system_info(struct retro_system_info *info)
|
|||||||
|
|
||||||
int sample_rate;
|
int sample_rate;
|
||||||
|
|
||||||
void retro_get_system_av_info(struct retro_system_av_info *info)
|
|
||||||
{
|
|
||||||
const int orientation = drivers[driverIndex]->flags & ORIENTATION_MASK;
|
|
||||||
const bool rotated = ((orientation == ROT90) || (orientation == ROT270));
|
|
||||||
|
|
||||||
const int width = rotated ? videoConfig.height : videoConfig.width;
|
|
||||||
const int height = rotated ? videoConfig.width : videoConfig.height;
|
|
||||||
|
|
||||||
info->geometry.base_width = width;
|
|
||||||
info->geometry.base_height = height;
|
|
||||||
info->geometry.max_width = width;
|
|
||||||
info->geometry.max_height = height;
|
|
||||||
info->geometry.aspect_ratio = rotated ? (float)videoConfig.aspect_y / (float)videoConfig.aspect_x : (float)videoConfig.aspect_x / (float)videoConfig.aspect_y;
|
|
||||||
info->timing.fps = Machine->drv->frames_per_second;
|
|
||||||
info->timing.sample_rate = sample_rate;
|
|
||||||
}
|
|
||||||
|
|
||||||
extern int frameskip;
|
extern int frameskip;
|
||||||
unsigned skip_disclaimer = 0;
|
unsigned skip_disclaimer = 0;
|
||||||
unsigned skip_warnings = 0;
|
unsigned skip_warnings = 0;
|
||||||
@ -193,6 +177,7 @@ unsigned cheats = 0;
|
|||||||
unsigned dial_share_xy = 0;
|
unsigned dial_share_xy = 0;
|
||||||
unsigned mouse_device = 0;
|
unsigned mouse_device = 0;
|
||||||
unsigned rstick_to_btns = 0;
|
unsigned rstick_to_btns = 0;
|
||||||
|
unsigned tate_mode = 0;
|
||||||
|
|
||||||
static void update_variables(void)
|
static void update_variables(void)
|
||||||
{
|
{
|
||||||
@ -319,6 +304,36 @@ static void update_variables(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
rstick_to_btns = 0;
|
rstick_to_btns = 0;
|
||||||
|
|
||||||
|
var.value = NULL;
|
||||||
|
var.key = "mame2003-tate_mode";
|
||||||
|
|
||||||
|
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value)
|
||||||
|
{
|
||||||
|
if(strcmp(var.value, "enabled") == 0)
|
||||||
|
tate_mode = 1;
|
||||||
|
else
|
||||||
|
tate_mode = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
tate_mode = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void retro_get_system_av_info(struct retro_system_av_info *info)
|
||||||
|
{
|
||||||
|
const int orientation = drivers[driverIndex]->flags & ORIENTATION_MASK;
|
||||||
|
const bool rotated = ((orientation == ROT90) || (orientation == ROT270));
|
||||||
|
|
||||||
|
const int width = rotated ? videoConfig.height : videoConfig.width;
|
||||||
|
const int height = rotated ? videoConfig.width : videoConfig.height;
|
||||||
|
|
||||||
|
info->geometry.base_width = width;
|
||||||
|
info->geometry.base_height = height;
|
||||||
|
info->geometry.max_width = width;
|
||||||
|
info->geometry.max_height = height;
|
||||||
|
info->geometry.aspect_ratio = (rotated && !tate_mode) ? (float)videoConfig.aspect_y / (float)videoConfig.aspect_x : (float)videoConfig.aspect_x / (float)videoConfig.aspect_y;
|
||||||
|
info->timing.fps = Machine->drv->frames_per_second;
|
||||||
|
info->timing.sample_rate = sample_rate;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void check_system_specs(void)
|
static void check_system_specs(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user