Added an option to Tools>GUI that creates/deletes a (program name).manifest file, to disable the stuff that kuja_killer didn't like. Only affects things for those using visual themes.

This commit is contained in:
ugetab 2010-04-23 19:32:51 +00:00
parent 80f6049f2e
commit 6ad9147ac8
4 changed files with 56 additions and 9 deletions

View File

@ -1,3 +1,4 @@
23-april-2010 - ugetab - Win32 - Added Tools>GUI option to partially disable visual themes, so the emulator can be made to look like it did in 2.1.1 and earlier releases.
20-april-2010 - adelikat - New lua functions movie.ispoweron() and movie.isfromsavestate()
20-april-2010 - adelikat - Win32 - Drag & Drop - if dropping a .fcm with no ROM loaded, prompt for one (same functionality that was added to .fm2 files)
08-april-2010 - ugetab - Win32 - Added conditional debugging option 'K', for bank PC is on

View File

@ -10,6 +10,31 @@ extern bool rightClickEnabled; //Declared in window.cpp and only an extern here
*
* @param hwndDlg Handle of the dialog window.
**/
char* ManifestFilePath()
{
char tempfilepath[2048];
GetModuleFileName(0, tempfilepath, 2048);
//std::string TestFilepath = tempfilepath;
strcat(tempfilepath,".manifest");
return tempfilepath;
}
bool ManifestFileExists()
{
long endPos = 0;
FILE * stream = fopen( ManifestFilePath(), "r" );
if (stream) {
fseek( stream, 0L, SEEK_END );
endPos = ftell( stream );
fclose( stream );
}
return (endPos > 0);
}
void CloseGuiDialog(HWND hwndDlg)
{
if(IsDlgButtonChecked(hwndDlg, CB_LOAD_FILE_OPEN) == BST_CHECKED)
@ -52,6 +77,21 @@ void CloseGuiDialog(HWND hwndDlg)
rightClickEnabled = false;
}
if(IsDlgButtonChecked(hwndDlg, CB_PARTIALVISUALTHEME)==BST_CHECKED)
{
FILE * stream = fopen( ManifestFilePath(), "w" );
if (stream) {
fputs ("<\?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"\?>\n<assembly\n xmlns=\"urn:schemas-microsoft-com:asm.v1\"\n manifestVersion=\"1.0\">\n<assemblyIdentity\n name=\"FCEUX\"\n processorArchitecture=\"x86\"\n version=\"1.0.0.0\"\n type=\"win32\"/>\n<description>FCEUX</description>\n</assembly>\n",stream);
fclose(stream);
}
}
else
{
remove(ManifestFilePath());
}
EndDialog(hwndDlg,0);
}
@ -89,6 +129,10 @@ BOOL CALLBACK GUIConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
CheckDlgButton(hwndDlg, CB_ENABLECONTEXTMENU, BST_CHECKED);
}
if(ManifestFileExists() > 0) {
CheckDlgButton(hwndDlg, CB_PARTIALVISUALTHEME, BST_CHECKED);
}
CenterWindowOnScreen(hwndDlg);
break;
@ -117,5 +161,4 @@ BOOL CALLBACK GUIConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
void ConfigGUI()
{
DialogBox(fceu_hInstance, "GUICONFIG", hAppWnd, GUIConCallB);
}
}

View File

@ -601,21 +601,23 @@ BEGIN
PUSHBUTTON "Turbo A",318,195,122,32,12
END
GUICONFIG DIALOGEX 16, 123, 184, 108
GUICONFIG DIALOGEX 16, 123, 184, 123
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "GUI Configuration"
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
DEFPUSHBUTTON "Close",BUTTON_CLOSE,64,86,56,14
DEFPUSHBUTTON "Close",BUTTON_CLOSE,64,101,56,14
CONTROL "Load ""File Open"" dialog when FCEUX starts.",CB_LOAD_FILE_OPEN,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,8,164,12
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,8,168,12
CONTROL "Automatically hide menu on game load.",CB_AUTO_HIDE_MENU,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,23,164,12
CONTROL "Ask confirmation on exit attempt.",CB_ASK_EXIT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,38,164,12
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,23,168,12
CONTROL "Ask confirmation on exit attempt.",CB_ASK_EXIT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,38,168,12
CONTROL "Disable screen saver while game is loaded.",CB_DISABLE_SCREEN_SAVER,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,53,164,12
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,53,168,12
CONTROL "Enable right-click context menu",CB_ENABLECONTEXTMENU,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,70,115,10
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,68,168,12
CONTROL "Partially disable Visual Themes (Requires restart)",CB_PARTIALVISUALTHEME,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,83,168,12
END
INPUTCONFIG DIALOGEX 122, 105, 349, 199

View File

@ -468,6 +468,7 @@
#define IDC_LUACONSOLE_CLEAR 1254
#define IDC_LUACONSOLE_CHOOSEFONT 1255
#define IDC_EDIT_LUAARGS 1256
#define CB_PARTIALVISUALTHEME 1257
#define MENU_NETWORK 40040
#define MENU_PALETTE 40041
#define MENU_SOUND 40042