Merged from revision: 7359

Fixes (by Buggler)
- new error message when launching game in fullscreen beyond desktop resolution
- fixed cycling previous item hotkey in cheat mode
- refactored main menu button and hotkey code

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7360 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2014-07-22 16:40:02 +00:00
parent 9f5aa4c227
commit a79be62f21
13 changed files with 129 additions and 102 deletions
+18 -4
View File
@@ -262,7 +262,7 @@ BOOLEAN InitializeVideoManager(HINSTANCE hInstance, UINT16 usCommandShow, void *
// Get a window handle for our application (gotta have on of those)
// Don't change this
//
if( 1==iScreenMode )
if( 1==iScreenMode ) // windowed mode
{
RECT window;
DWORD style;
@@ -286,9 +286,23 @@ BOOLEAN InitializeVideoManager(HINSTANCE hInstance, UINT16 usCommandShow, void *
GetClientRect( hWindow, &window);
window.top = window.top;
}
else
hWindow = CreateWindowEx(WS_EX_TOPMOST, (LPCSTR) ClassName, "Jagged Alliance 2", WS_POPUP | WS_VISIBLE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, NULL, NULL, hInstance, NULL);
else // fullscreen mode
{
// Buggler: Get Primary Desktop Resolution
DWORD dwScreenWidth = ::GetSystemMetrics(SM_CXSCREEN);
DWORD dwScreenHeight = ::GetSystemMetrics(SM_CYSCREEN);
if (SCREEN_WIDTH > dwScreenWidth || SCREEN_HEIGHT > dwScreenHeight )
{
CHAR16 sString[ 256 ];
swprintf( sString, Additional113Text[ADDTEXT_LOWERRES_REQUIRED], dwScreenWidth, dwScreenHeight );
MessageBoxW( NULL, sString, APPLICATION_NAMEW, MB_ICONEXCLAMATION);
PostQuitMessage(1);
return FALSE;
}
else
hWindow = CreateWindowEx(WS_EX_TOPMOST, (LPCSTR) ClassName, "Jagged Alliance 2", WS_POPUP | WS_VISIBLE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, NULL, NULL, hInstance, NULL);
}
if (hWindow == NULL)
{
DebugMsg(TOPIC_VIDEO, DBG_LEVEL_0, "Failed to create window frame for Direct Draw");