From d9b6e86c40ca30c9e8673e7ad1998647978af0a7 Mon Sep 17 00:00:00 2001 From: nitsuja Date: Wed, 29 Jul 2009 04:51:38 +0000 Subject: [PATCH] fix for emu window not showing up after it gets saved at position (-32000,-32000) --- desmume/src/windows/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index 675b6dbe2..fa3705744 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -1545,6 +1545,8 @@ int _main() ForceRatio = GetPrivateProfileBool("Video","Window Force Ratio", 1, IniName); WndX = GetPrivateProfileInt("Video","WindowPosX", CW_USEDEFAULT, IniName); WndY = GetPrivateProfileInt("Video","WindowPosY", CW_USEDEFAULT, IniName); + if(WndX < -10000) WndX = CW_USEDEFAULT; // fix for missing window problem + if(WndY < -10000) WndY = CW_USEDEFAULT; // (happens if you close desmume while it's minimized) video.width = GetPrivateProfileInt("Video", "Width", 256, IniName); video.height = GetPrivateProfileInt("Video", "Height", 384, IniName);