summaryrefslogtreecommitdiff
path: root/win32/gui
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-08-13 01:32:56 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-08-13 01:32:56 +0000
commitc6191a4474b4cab60cc9886860c8b6de7c4e146b (patch)
tree7b450e4d69ec922805cf2448af9cc53286f17d73 /win32/gui
parent7d0cd28dd85965b4f94c8eeb5aa2c70297122485 (diff)
downloadpcsxr-c6191a4474b4cab60cc9886860c8b6de7c4e146b.tar.gz
dfxvideo: Readded windows support.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@56047 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'win32/gui')
-rw-r--r--win32/gui/Win32.h1
-rw-r--r--win32/gui/WndMain.c29
-rw-r--r--win32/gui/plugin.c2
3 files changed, 10 insertions, 22 deletions
diff --git a/win32/gui/Win32.h b/win32/gui/Win32.h
index 39aa59f3..bfe51543 100644
--- a/win32/gui/Win32.h
+++ b/win32/gui/Win32.h
@@ -58,7 +58,6 @@ void PADhandleKey(int key);
int LoadConfig();
void SaveConfig();
-void UpdateMenuSlots();
void ResetMenuSlots();
void InitLanguages();
diff --git a/win32/gui/WndMain.c b/win32/gui/WndMain.c
index 2e1ae141..cee6a11f 100644
--- a/win32/gui/WndMain.c
+++ b/win32/gui/WndMain.c
@@ -210,26 +210,16 @@ void RestoreWindow() {
ShowCursor(TRUE);
}
-int Slots[5] = { -1, -1, -1, -1, -1 };
-
-void ResetMenuSlots() {
- int i;
-
- for (i = 0; i < 5; i++) {
- if (Slots[i] == -1)
- EnableMenuItem(GetSubMenu(gApp.hMenu, 0), ID_FILE_STATES_LOAD_SLOT1+i, MF_GRAYED);
- else
- EnableMenuItem(GetSubMenu(gApp.hMenu, 0), ID_FILE_STATES_LOAD_SLOT1+i, MF_ENABLED);
- }
-}
-
-void UpdateMenuSlots() {
+void ResetMenuSlots() {
char str[256];
int i;
- for (i = 0; i < 5; i++) {
- GetStateFilename(str, i);
- Slots[i] = CheckState(str);
+ for (i = 0; i < 9; i++) {
+ GetStateFilename(str, i);
+ if (CheckState(str) == -1)
+ EnableMenuItem(gApp.hMenu, ID_FILE_STATES_LOAD_SLOT1+i, MF_GRAYED);
+ else
+ EnableMenuItem(gApp.hMenu, ID_FILE_STATES_LOAD_SLOT1+i, MF_ENABLED);
}
}
@@ -1603,7 +1593,9 @@ void CreateMainMenu() {
EnableMenuItem(gApp.hMenu, ID_CONFIGURATION, MF_BYCOMMAND | MF_GRAYED);
if (!UsingIso()) {
EnableMenuItem(gApp.hMenu, ID_EMULATOR_SWITCH_ISO, MF_BYCOMMAND | MF_GRAYED);
- }
+ }
+
+ ResetMenuSlots();
} else {
EnableMenuItem(gApp.hMenu, ID_EMULATOR_RESET, MF_BYCOMMAND | MF_GRAYED);
EnableMenuItem(gApp.hMenu, ID_EMULATOR_RUN, MF_BYCOMMAND | MF_GRAYED);
@@ -1662,7 +1654,6 @@ void CreateMainWindow(int nCmdShow) {
NULL);
gApp.hWnd = hWnd;
- ResetMenuSlots();
CreateMainMenu();
SetMenu(gApp.hWnd, gApp.hMenu);
diff --git a/win32/gui/plugin.c b/win32/gui/plugin.c
index 57171a34..b3939028 100644
--- a/win32/gui/plugin.c
+++ b/win32/gui/plugin.c
@@ -308,8 +308,6 @@ void ClosePlugins() {
PAD1_close();
PAD2_close();
- UpdateMenuSlots();
-
ret = CDR_close();
if (ret < 0) { SysMessage (_("Error Closing CDR Plugin")); return; }
ret = GPU_close();