From 95e463ce272626e9394c5896142281857b9b667f Mon Sep 17 00:00:00 2001 From: nitsuja Date: Sun, 1 Nov 2009 09:07:21 +0000 Subject: [PATCH] - fixed movie not closing when loading a new rom or closing the rom - fixed tab+alt key combination getting the emulator stuck in fast-forward mode --- desmume/src/NDSSystem.cpp | 3 +++ desmume/src/windows/main.cpp | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/desmume/src/NDSSystem.cpp b/desmume/src/NDSSystem.cpp index 7d804a575..9c2aca979 100644 --- a/desmume/src/NDSSystem.cpp +++ b/desmume/src/NDSSystem.cpp @@ -804,6 +804,8 @@ int NDS_LoadROM(const char *filename, const char *logicalFilename) #endif cheatsSearchClose(); + FCEUI_StopMovie(); + MMU_unsetRom(); NDS_SetROM((u8*)gameInfo.romdata, mask); NDS_Reset(); @@ -952,6 +954,7 @@ int NDS_LoadROM(const char *filename, const char *logicalFilename) #endif void NDS_FreeROM(void) { + FCEUI_StopMovie(); if ((u8*)MMU.CART_ROM == (u8*)gameInfo.romdata) gameInfo.romdata = NULL; if (MMU.CART_ROM != MMU.UNUSED_RAM) diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index f8d015169..b67f73dbb 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -2824,7 +2824,9 @@ int HandleKeyUp(WPARAM wParam, LPARAM lParam, int modifiers) SCustomKey *key = &CustomKeys.key(0); while (!IsLastCustomKey(key)) { - if (wParam == key->key && modifiers == key->modifiers && key->handleKeyUp) { + // the modifiers check here was disabled to fix the following problem: + // hold tab, hold alt, release tab, release alt -> fast forward gets stuck on + if (key->handleKeyUp && wParam == key->key /*&& modifiers == key->modifiers*/) { key->handleKeyUp(key->param); } key++;