merge CreateGraphicsWindow and RecreateGraphicsWindow
This commit is contained in:
@@ -233,25 +233,6 @@ static int GetWindowStyle( bool bWindowed )
|
|||||||
|
|
||||||
void GraphicsWindow::CreateGraphicsWindow( const VideoModeParams &p )
|
void GraphicsWindow::CreateGraphicsWindow( const VideoModeParams &p )
|
||||||
{
|
{
|
||||||
ASSERT( g_hWndMain == NULL );
|
|
||||||
|
|
||||||
int iWindowStyle = GetWindowStyle( p.windowed );
|
|
||||||
|
|
||||||
AppInstance inst;
|
|
||||||
HWND hWnd = CreateWindow( g_sClassName, "app", iWindowStyle,
|
|
||||||
0, 0, 0, 0, NULL, NULL, inst, NULL );
|
|
||||||
if( hWnd == NULL )
|
|
||||||
RageException::Throw( "%s", werr_ssprintf( GetLastError(), "CreateWindow" ).c_str() );
|
|
||||||
|
|
||||||
g_hWndMain = hWnd;
|
|
||||||
CrashHandler::SetForegroundWindow( g_hWndMain );
|
|
||||||
g_HDC = GetDC( g_hWndMain );
|
|
||||||
}
|
|
||||||
|
|
||||||
void GraphicsWindow::RecreateGraphicsWindow( const VideoModeParams &p )
|
|
||||||
{
|
|
||||||
ASSERT( g_hWndMain != NULL );
|
|
||||||
|
|
||||||
int iWindowStyle = GetWindowStyle( p.windowed );
|
int iWindowStyle = GetWindowStyle( p.windowed );
|
||||||
|
|
||||||
AppInstance inst;
|
AppInstance inst;
|
||||||
@@ -278,6 +259,11 @@ void GraphicsWindow::RecreateGraphicsWindow( const VideoModeParams &p )
|
|||||||
g_HDC = GetDC( g_hWndMain );
|
g_HDC = GetDC( g_hWndMain );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GraphicsWindow::RecreateGraphicsWindow( const VideoModeParams &p )
|
||||||
|
{
|
||||||
|
CreateGraphicsWindow(p);
|
||||||
|
}
|
||||||
|
|
||||||
/* Set the final window size, set the window text and icon, and then unhide the
|
/* Set the final window size, set the window text and icon, and then unhide the
|
||||||
* window. */
|
* window. */
|
||||||
void GraphicsWindow::ConfigureGraphicsWindow( const VideoModeParams &p )
|
void GraphicsWindow::ConfigureGraphicsWindow( const VideoModeParams &p )
|
||||||
|
|||||||
Reference in New Issue
Block a user