Modified EE opcode table to make add/sub require sign-extended operands. This fixes a crash in Unlimited SaGa.

WinGUI: Fixed a minor issue when changing language.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@564 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
tmkkmac 2009-02-21 18:07:15 +00:00
parent de2e939fcc
commit a22035664d
2 changed files with 11 additions and 6 deletions

View File

@ -40,6 +40,7 @@
#include "implement.h" // pthreads-win32 defines for startup/shutdown
unsigned int langsMax;
bool shouldQuitOnDestroy = true;
struct _langs {
@ -843,6 +844,7 @@ LRESULT WINAPI MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
default:
if (LOWORD(wParam) >= ID_LANGS && LOWORD(wParam) <= (ID_LANGS + langsMax)) {
shouldQuitOnDestroy = false;
DestroyWindow(gApp.hWnd);
ChangeLanguage(langs[LOWORD(wParam) - ID_LANGS].lang);
CreateMainWindow(SW_SHOWNORMAL);
@ -852,9 +854,12 @@ LRESULT WINAPI MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
return TRUE;
case WM_DESTROY:
DeleteObject(hbitmap_background);
PostQuitMessage(0);
gApp.hWnd = NULL;
if( shouldQuitOnDestroy ) {
DeleteObject(hbitmap_background);
PostQuitMessage(0);
gApp.hWnd = NULL;
}
else shouldQuitOnDestroy = true;
return FALSE;
// Explicit handling of WM_CLOSE.

View File

@ -301,8 +301,8 @@ __forceinline void BSCPropagate::rpropSPECIAL()
case 34: // sub
case 35: // subu
rpropSetWrite(_Rd_, EEINST_LIVE1);
if( _Rs_ ) rpropSetRead(_Rs_, 0);
if( _Rt_ ) rpropSetRead(_Rt_, 0);
if( _Rs_ ) rpropSetRead(_Rs_, EEINST_LIVE1);
if( _Rt_ ) rpropSetRead(_Rt_, EEINST_LIVE1);
pinst.info |= EEINST_MMX;
break;
@ -940,7 +940,7 @@ void BSCPropagate::rprop()
case 8: // addi
case 9: // addiu
rpropSetWrite(_Rt_, EEINST_LIVE1);
rpropSetRead(_Rs_, 0);
rpropSetRead(_Rs_, EEINST_LIVE1);
pinst.info |= EEINST_MMX;
break;