Skip to content

Commit

Permalink
re-add windows specific stuff, properly ifdefing it? (should fix #360)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeromus committed Aug 19, 2020
1 parent 79c6ab4 commit f606400
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions desmume/src/NDSSystem.cpp
Expand Up @@ -59,7 +59,11 @@
#include "wifi.h"
#include "Database.h"
#include "frontend/modules/Disassembler.h"

#ifdef HOST_WINDOWS
#include "display.h"
extern HWND DisViewWnd[2];
#endif

#ifdef GDB_STUB
#include "gdbstub.h"
Expand Down Expand Up @@ -1916,14 +1920,15 @@ static /*donotinline*/ std::pair<s32,s32> armInnerLoop(
while(timer < s32next && !sequencer.reschedule && execute)
{
// breakpoint handling
#ifdef HOST_WINDOWS
for (int i = 0; i < NDS_ARM9.breakPoints.size(); ++i) {
if (NDS_ARM9.instruct_adr == NDS_ARM9.breakPoints[i] && !NDS_ARM9.debugStep) {
emu_paused = true;
paused = true;
execute = false;
// update debug display
//PostMessageA(DisViewWnd[0], WM_COMMAND, IDC_DISASMSEEK, NDS_ARM9.instruct_adr);
//InvalidateRect(DisViewWnd[0], NULL, FALSE);
PostMessageA(DisViewWnd[0], WM_COMMAND, IDC_DISASMSEEK, NDS_ARM9.instruct_adr);
InvalidateRect(DisViewWnd[0], NULL, FALSE);
return std::make_pair(arm9, arm7);
}
}
Expand All @@ -1933,11 +1938,13 @@ static /*donotinline*/ std::pair<s32,s32> armInnerLoop(
paused = true;
execute = false;
// update debug display
//PostMessageA(DisViewWnd[1], WM_COMMAND, IDC_DISASMSEEK, NDS_ARM7.instruct_adr);
//InvalidateRect(DisViewWnd[1], NULL, FALSE);
PostMessageA(DisViewWnd[1], WM_COMMAND, IDC_DISASMSEEK, NDS_ARM7.instruct_adr);
InvalidateRect(DisViewWnd[1], NULL, FALSE);
return std::make_pair(arm9, arm7);
}
}
#endif //HOST_WINDOWS

if(doarm9 && (!doarm7 || arm9 <= timer))
{
if(!(NDS_ARM9.freeze & CPU_FREEZE_WAIT_IRQ) && !nds.freezeBus)
Expand Down

0 comments on commit f606400

Please sign in to comment.