jbhook: Finalise half-baked "rotate window" hooks
This commit is contained in:
@@ -42,8 +42,6 @@ static struct options options;
|
||||
|
||||
static bool my_dll_entry_init(char *sidcode, struct property_node *param)
|
||||
{
|
||||
jbhook_util_gfx_install_vertical_hooks();
|
||||
|
||||
bool eam_io_ok;
|
||||
bool jb_io_ok;
|
||||
|
||||
@@ -52,6 +50,10 @@ static bool my_dll_entry_init(char *sidcode, struct property_node *param)
|
||||
|
||||
log_info("--- Begin jbhook dll_entry_init ---");
|
||||
|
||||
if(options.vertical) {
|
||||
jbhook_util_gfx_install_vertical_hooks();
|
||||
}
|
||||
|
||||
if (!options.disable_p3ioemu) {
|
||||
log_assert(sidcode != NULL);
|
||||
// pcbid and eamid are only used here for sec check, the ones used for
|
||||
@@ -157,9 +159,11 @@ static HWND CDECL my_mwindow_create(
|
||||
log_info("---------------- Begin jbhook mwindow_create ----------------");
|
||||
log_info("-------------------------------------------------------------");
|
||||
|
||||
DWORD tmp = window_width;
|
||||
window_width = window_height;
|
||||
window_height = tmp;
|
||||
if(options.vertical) {
|
||||
DWORD tmp = window_width;
|
||||
window_width = window_height;
|
||||
window_height = tmp;
|
||||
}
|
||||
|
||||
return real_mwindow_create(
|
||||
hinstance,
|
||||
|
||||
@@ -65,6 +65,11 @@ bool options_read_cmdline(struct options *options, int argc, const char **argv)
|
||||
break;
|
||||
}
|
||||
|
||||
case 'v': {
|
||||
options->vertical = true;
|
||||
break;
|
||||
}
|
||||
|
||||
case 'a': {
|
||||
options->disable_adapteremu = true;
|
||||
break;
|
||||
@@ -96,6 +101,7 @@ void options_print_usage(void)
|
||||
" -h Print this usage message\n"
|
||||
" -w Run the game windowed\n"
|
||||
" -f Run the game in a framed window (needs -w option)\n"
|
||||
" -v Rotate the normally-horizontal game window to be vertical\n"
|
||||
" -a Disable adapter hook\n"
|
||||
" -c Disable card emulation (e.g. when running on a "
|
||||
"real cab)\n"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
struct options {
|
||||
bool windowed;
|
||||
bool window_framed;
|
||||
bool vertical;
|
||||
bool disable_p3ioemu;
|
||||
bool disable_cardemu;
|
||||
bool disable_adapteremu;
|
||||
|
||||
Reference in New Issue
Block a user