From d61634cfe4f6cc0fc4ba9cb070aa771a01df22a6 Mon Sep 17 00:00:00 2001 From: feos-tas Date: Sun, 31 Jul 2016 20:46:32 +0000 Subject: [PATCH] -pal won't die if dendy was loaded from config on launch. if -dendy isn't specified, and if left from config, it will get overridden by -pal. make deploy.bat a bit more handy --- trunk/src/drivers/win/args.cpp | 56 ++++++++++++++++---------------- trunk/src/drivers/win/main.cpp | 8 +++-- trunk/src/drivers/win/main.h | 1 + trunk/src/drivers/win/window.cpp | 2 +- trunk/vc/deploy.bat | 6 +++- 5 files changed, 41 insertions(+), 32 deletions(-) diff --git a/trunk/src/drivers/win/args.cpp b/trunk/src/drivers/win/args.cpp index 2c43e0bc..2f3076e5 100644 --- a/trunk/src/drivers/win/args.cpp +++ b/trunk/src/drivers/win/args.cpp @@ -43,34 +43,34 @@ extern bool turbo; char *ParseArgies(int argc, char *argv[]) { static ARGPSTRUCT FCEUArgs[]={ - {"-pal", &pal_setting_specified,&PAL, 0}, - {"-dendy", &pal_setting_specified,&dendy, 0}, - {"-noicon", 0, &status_icon, 0}, - {"-gg", 0, &genie, 0}, - {"-no8lim", 0, &eoptions, 0x8000|EO_NOSPRLIM}, - //{"-nofs", 0, &eoptions, 0}, - {"-clipsides", 0, &eoptions, 0x8000|EO_CLIPSIDES}, - {"-nothrottle", 0, &eoptions, 0x8000|EO_NOTHROTTLE}, - {"-playmovie", 0, &MovieToLoad, 0x4001}, - {"-lua", 0, &LuaToLoad, 0x4001}, - {"-palette", 0, &PaletteToLoad, 0x4001}, - {"-loadstate", 0, &StateToLoad, 0x4001}, - {"-readonly", 0, &replayReadOnlySetting, 0}, - {"-stopframe", 0, &replayStopFrameSetting,0}, - {"-framedisplay",0, &frame_display, 0}, - {"-inputdisplay",0, &input_display, 0}, - {"-allowUDLR", 0, &allowUDLR, 0}, - {"-stopmovie", 0, &pauseAfterPlayback, 0}, - {"-shutmovie", 0, &closeFinishedMovie, 0}, - {"-bginput", 0, &EnableBackgroundInput, 0}, - {"-turbo", 0, &turbo, 0}, - {"-pause", 0, &PauseAfterLoad, 0}, - {"-cfg", 0, &ConfigToLoad, 0x4001}, - {"-avi", 0, &AviToLoad, 0x4001}, - {"-avicapture", 0, &AVICapture, 0}, - {"-dumpinput", 0, &DumpInput, 0x4001}, - {"-playinput", 0, &PlayInput, 0x4001}, - {0, 0, 0, 0}, + {"-pal", &pal_setting_specified, &PAL, 0}, + {"-dendy", &dendy_setting_specified,&dendy, 0}, + {"-noicon", 0, &status_icon, 0}, + {"-gg", 0, &genie, 0}, + {"-no8lim", 0, &eoptions, 0x8000|EO_NOSPRLIM}, + //{"-nofs", 0, &eoptions, 0}, + {"-clipsides", 0, &eoptions, 0x8000|EO_CLIPSIDES}, + {"-nothrottle", 0, &eoptions, 0x8000|EO_NOTHROTTLE}, + {"-playmovie", 0, &MovieToLoad, 0x4001}, + {"-lua", 0, &LuaToLoad, 0x4001}, + {"-palette", 0, &PaletteToLoad, 0x4001}, + {"-loadstate", 0, &StateToLoad, 0x4001}, + {"-readonly", 0, &replayReadOnlySetting, 0}, + {"-stopframe", 0, &replayStopFrameSetting,0}, + {"-framedisplay",0, &frame_display, 0}, + {"-inputdisplay",0, &input_display, 0}, + {"-allowUDLR", 0, &allowUDLR, 0}, + {"-stopmovie", 0, &pauseAfterPlayback, 0}, + {"-shutmovie", 0, &closeFinishedMovie, 0}, + {"-bginput", 0, &EnableBackgroundInput, 0}, + {"-turbo", 0, &turbo, 0}, + {"-pause", 0, &PauseAfterLoad, 0}, + {"-cfg", 0, &ConfigToLoad, 0x4001}, + {"-avi", 0, &AviToLoad, 0x4001}, + {"-avicapture", 0, &AVICapture, 0}, + {"-dumpinput", 0, &DumpInput, 0x4001}, + {"-playinput", 0, &PlayInput, 0x4001}, + {0, 0, 0, 0}, }; if(argc <= 1) diff --git a/trunk/src/drivers/win/main.cpp b/trunk/src/drivers/win/main.cpp index 87b2f266..a2a43e4b 100644 --- a/trunk/src/drivers/win/main.cpp +++ b/trunk/src/drivers/win/main.cpp @@ -147,6 +147,7 @@ int genie = 0; int pal_emulation = 0; int pal_setting_specified = 0; int dendy = 0; +int dendy_setting_specified = 0; bool swapDuty = 0; // some Famicom and NES clones had duty cycle bits swapped int ntsccol = 0, ntsctint, ntschue; std::string BaseDirectory; @@ -767,12 +768,15 @@ int main(int argc,char *argv[]) LoadNewGamey(hAppWnd, 0); } + if (PAL && pal_setting_specified && !dendy_setting_specified) + dendy = 0; + if (PAL && !dendy) FCEUI_SetRegion(1, pal_setting_specified); else if (dendy) - FCEUI_SetRegion(2, pal_setting_specified); + FCEUI_SetRegion(2, dendy_setting_specified); else - FCEUI_SetRegion(0, pal_setting_specified); + FCEUI_SetRegion(0, pal_setting_specified || dendy_setting_specified); if(PaletteToLoad) { diff --git a/trunk/src/drivers/win/main.h b/trunk/src/drivers/win/main.h index 195c5059..b7d7305e 100644 --- a/trunk/src/drivers/win/main.h +++ b/trunk/src/drivers/win/main.h @@ -46,6 +46,7 @@ extern int pal_setting_specified; // dendy and pal should have been designed alongside, using enum or alike // now it's not possible to do it easily, so we'll just use the flag here and there, not to touch PAL logics extern int dendy; +extern int dendy_setting_specified; extern int status_icon; extern int frame_display; extern int rerecord_display; diff --git a/trunk/src/drivers/win/window.cpp b/trunk/src/drivers/win/window.cpp index 08c19479..75776efc 100644 --- a/trunk/src/drivers/win/window.cpp +++ b/trunk/src/drivers/win/window.cpp @@ -1042,7 +1042,7 @@ bool ALoad(const char *nameo, char* innerFilename, bool silent) if (GameInfo) FCEUI_CloseGame(); - if (FCEUI_LoadGameVirtual(nameo, !pal_setting_specified, silent)) + if (FCEUI_LoadGameVirtual(nameo, !(pal_setting_specified || dendy_setting_specified), silent)) { pal_emulation = FCEUI_GetCurrentVidSystem(0, 0); diff --git a/trunk/vc/deploy.bat b/trunk/vc/deploy.bat index 96175153..8fdd708f 100644 --- a/trunk/vc/deploy.bat +++ b/trunk/vc/deploy.bat @@ -1,2 +1,6 @@ +@echo off +echo Password: +set /p ANSWER= +@echo on call archive.bat -call upload.bat %1 \ No newline at end of file +call upload.bat %ANSWER% \ No newline at end of file