merge old CreateGraphicsWindow
This commit is contained in:
@@ -224,8 +224,14 @@ static int GetWindowStyle( bool bWindowed )
|
|||||||
return WS_POPUP;
|
return WS_POPUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CreateGraphicsWindow( const VideoModeParams &p )
|
/* Set the final window size, set the window text and icon, and then unhide the
|
||||||
|
* window. */
|
||||||
|
void GraphicsWindow::ConfigureGraphicsWindow( const VideoModeParams &p, bool bForceRecreateWindow )
|
||||||
{
|
{
|
||||||
|
g_CurrentParams = p;
|
||||||
|
|
||||||
|
if( g_hWndMain == NULL || bForceRecreateWindow )
|
||||||
|
{
|
||||||
int iWindowStyle = GetWindowStyle( p.windowed );
|
int iWindowStyle = GetWindowStyle( p.windowed );
|
||||||
|
|
||||||
AppInstance inst;
|
AppInstance inst;
|
||||||
@@ -250,18 +256,7 @@ static void CreateGraphicsWindow( const VideoModeParams &p )
|
|||||||
g_hWndMain = hWnd;
|
g_hWndMain = hWnd;
|
||||||
CrashHandler::SetForegroundWindow( g_hWndMain );
|
CrashHandler::SetForegroundWindow( g_hWndMain );
|
||||||
g_HDC = GetDC( g_hWndMain );
|
g_HDC = GetDC( g_hWndMain );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the final window size, set the window text and icon, and then unhide the
|
|
||||||
* window. */
|
|
||||||
void GraphicsWindow::ConfigureGraphicsWindow( const VideoModeParams &p, bool bForceRecreateWindow )
|
|
||||||
{
|
|
||||||
g_CurrentParams = p;
|
|
||||||
|
|
||||||
if( g_hWndMain == NULL || bForceRecreateWindow )
|
|
||||||
CreateGraphicsWindow( p );
|
|
||||||
|
|
||||||
ASSERT( g_hWndMain );
|
|
||||||
|
|
||||||
/* Update the window title. */
|
/* Update the window title. */
|
||||||
do
|
do
|
||||||
|
|||||||
Reference in New Issue
Block a user