From 72036009b34d80b8d5d8be6272867b44ab8c401c Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 15 Jan 2006 00:37:03 +0000 Subject: [PATCH] merge CreateGraphicsWindow and RecreateGraphicsWindow --- .../src/archutils/Win32/GraphicsWindow.cpp | 24 ++++--------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/stepmania/src/archutils/Win32/GraphicsWindow.cpp b/stepmania/src/archutils/Win32/GraphicsWindow.cpp index ded2e2193b..c8c8aa6224 100644 --- a/stepmania/src/archutils/Win32/GraphicsWindow.cpp +++ b/stepmania/src/archutils/Win32/GraphicsWindow.cpp @@ -233,25 +233,6 @@ static int GetWindowStyle( bool bWindowed ) 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 ); AppInstance inst; @@ -278,6 +259,11 @@ void GraphicsWindow::RecreateGraphicsWindow( const VideoModeParams &p ) 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 * window. */ void GraphicsWindow::ConfigureGraphicsWindow( const VideoModeParams &p )