fuck that shit.

I fucking give up.

Windows actually doesn't want to cooperate either, and is being utter shit.

so, I'm going to do it the desmume way.
This commit is contained in:
StapleButter 2018-10-26 20:10:25 +02:00
parent 2b20b49bb3
commit c8d63f2be7

View File

@ -59,7 +59,8 @@ uiMenuItem* MenuItem_SaveState;
uiMenuItem* MenuItem_LoadState; uiMenuItem* MenuItem_LoadState;
uiMenuItem* MenuItem_UndoStateLoad; uiMenuItem* MenuItem_UndoStateLoad;
uiMenuItem* MenuItem_LoadStateSlot[8]; uiMenuItem* MenuItem_SaveStateSlot[9];
uiMenuItem* MenuItem_LoadStateSlot[9];
uiMenuItem* MenuItem_Pause; uiMenuItem* MenuItem_Pause;
uiMenuItem* MenuItem_Reset; uiMenuItem* MenuItem_Reset;
@ -346,9 +347,9 @@ int EmuThreadFunc(void* burp)
{ {
uiAreaQueueRedrawAll(MainDrawArea); uiAreaQueueRedrawAll(MainDrawArea);
} }
EmuStatus = EmuRunning; EmuStatus = EmuRunning;
SDL_Delay(100); SDL_Delay(100);
} }
} }
@ -784,6 +785,9 @@ void Run()
else uiMenuItemDisable(MenuItem_LoadStateSlot[i]); else uiMenuItemDisable(MenuItem_LoadStateSlot[i]);
} }
for (int i = 0; i < 9; i++) uiMenuItemEnable(MenuItem_SaveStateSlot[i]);
uiMenuItemEnable(MenuItem_LoadStateSlot[8]);
uiMenuItemEnable(MenuItem_Pause); uiMenuItemEnable(MenuItem_Pause);
uiMenuItemEnable(MenuItem_Reset); uiMenuItemEnable(MenuItem_Reset);
uiMenuItemEnable(MenuItem_Stop); uiMenuItemEnable(MenuItem_Stop);
@ -796,11 +800,11 @@ void Stop(bool internal)
if (!internal) // if shutting down from the UI thread, wait till the emu thread has stopped if (!internal) // if shutting down from the UI thread, wait till the emu thread has stopped
while (EmuStatus != 2); while (EmuStatus != 2);
RunningSomething = false; RunningSomething = false;
uiWindowSetTitle(MainWindow, "melonDS " MELONDS_VERSION); uiWindowSetTitle(MainWindow, "melonDS " MELONDS_VERSION);
uiMenuItemDisable(MenuItem_SaveState); for (int i = 0; i < 9; i++) uiMenuItemDisable(MenuItem_SaveStateSlot[i]);
uiMenuItemDisable(MenuItem_LoadState); for (int i = 0; i < 9; i++) uiMenuItemDisable(MenuItem_LoadStateSlot[i]);
uiMenuItemDisable(MenuItem_UndoStateLoad); uiMenuItemDisable(MenuItem_UndoStateLoad);
uiMenuItemDisable(MenuItem_Pause); uiMenuItemDisable(MenuItem_Pause);
@ -1070,7 +1074,7 @@ void OnCloseByMenu(uiMenuItem* item, uiWindow* window, void* blarg)
{ {
EmuRunning = 3; EmuRunning = 3;
while (EmuStatus != 3); while (EmuStatus != 3);
uiControlDestroy(uiControl(window)); uiControlDestroy(uiControl(window));
uiQuit(); uiQuit();
} }
@ -1381,6 +1385,8 @@ int main(int argc, char** argv)
uiMenuItem* ssitem = uiMenuAppendItem(submenu, name); uiMenuItem* ssitem = uiMenuAppendItem(submenu, name);
uiMenuItemOnClicked(ssitem, OnSaveState, (void*)&kSavestateNum[i]); uiMenuItemOnClicked(ssitem, OnSaveState, (void*)&kSavestateNum[i]);
MenuItem_SaveStateSlot[i] = ssitem;
} }
MenuItem_SaveState = uiMenuAppendSubmenu(menu, submenu); MenuItem_SaveState = uiMenuAppendSubmenu(menu, submenu);
@ -1399,7 +1405,7 @@ int main(int argc, char** argv)
uiMenuItem* ssitem = uiMenuAppendItem(submenu, name); uiMenuItem* ssitem = uiMenuAppendItem(submenu, name);
uiMenuItemOnClicked(ssitem, OnLoadState, (void*)&kSavestateNum[i]); uiMenuItemOnClicked(ssitem, OnLoadState, (void*)&kSavestateNum[i]);
if (i < 8) MenuItem_LoadStateSlot[i] = ssitem; MenuItem_LoadStateSlot[i] = ssitem;
} }
MenuItem_LoadState = uiMenuAppendSubmenu(menu, submenu); MenuItem_LoadState = uiMenuAppendSubmenu(menu, submenu);
@ -1512,8 +1518,10 @@ int main(int argc, char** argv)
uiWindowOnGetFocus(MainWindow, OnGetFocus, NULL); uiWindowOnGetFocus(MainWindow, OnGetFocus, NULL);
uiWindowOnLoseFocus(MainWindow, OnLoseFocus, NULL); uiWindowOnLoseFocus(MainWindow, OnLoseFocus, NULL);
uiMenuItemDisable(MenuItem_SaveState); //uiMenuItemDisable(MenuItem_SaveState);
uiMenuItemDisable(MenuItem_LoadState); //uiMenuItemDisable(MenuItem_LoadState);
for (int i = 0; i < 9; i++) uiMenuItemDisable(MenuItem_SaveStateSlot[i]);
for (int i = 0; i < 9; i++) uiMenuItemDisable(MenuItem_LoadStateSlot[i]);
uiMenuItemDisable(MenuItem_UndoStateLoad); uiMenuItemDisable(MenuItem_UndoStateLoad);
uiMenuItemDisable(MenuItem_Pause); uiMenuItemDisable(MenuItem_Pause);