From 77c1837c789c50ed8fa80f6a862d33387e432125 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Mon, 14 Aug 2006 21:11:20 +0000 Subject: * Merged ioq3-r838 - OS X Universal Binary creation script - OS X x86 support - OS X vm support - SDL video mode selection bug fix - "Home directory" support on windows - Windows SMP deadlock fix - Improved JPEG quality (screenshots/video) - AVIs recorded with \video command are now actually AVIs - Usual assortment of ioq3 tweaks and fixes --- src/win32/win_glimp.c | 4 ++-- src/win32/win_local.h | 1 + src/win32/win_shared.c | 21 ++++++++++++++++++++- 3 files changed, 23 insertions(+), 3 deletions(-) (limited to 'src/win32') diff --git a/src/win32/win_glimp.c b/src/win32/win_glimp.c index 22e98e5f..ef8651dd 100644 --- a/src/win32/win_glimp.c +++ b/src/win32/win_glimp.c @@ -1562,13 +1562,13 @@ void *GLimp_RendererSleep( void ) { wglErrors++; } - ResetEvent( renderActiveEvent ); - // after this, the front end can exit GLimp_FrontEndSleep SetEvent( renderCompletedEvent ); WaitForSingleObject( renderCommandsEvent, INFINITE ); + ResetEvent( renderActiveEvent ); + if ( !qwglMakeCurrent( glw_state.hDC, glw_state.hGLRC ) ) { wglErrors++; } diff --git a/src/win32/win_local.h b/src/win32/win_local.h index b0e85a15..9d599730 100644 --- a/src/win32/win_local.h +++ b/src/win32/win_local.h @@ -38,6 +38,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include #include +#include void IN_MouseEvent (int mstate); diff --git a/src/win32/win_shared.c b/src/win32/win_shared.c index 318d9418..003254d9 100644 --- a/src/win32/win_shared.c +++ b/src/win32/win_shared.c @@ -286,7 +286,26 @@ char *Sys_GetCurrentUser( void ) } char *Sys_DefaultHomePath(void) { - return NULL; + TCHAR szPath[MAX_PATH]; + static char path[MAX_OSPATH]; + + if( !SUCCEEDED( SHGetFolderPath( NULL, CSIDL_LOCAL_APPDATA, + NULL, 0, szPath ) ) ) + { + + return NULL; + } + Q_strncpyz( path, szPath, sizeof(path) ); + Q_strcat( path, sizeof(path), "\\Quake3" ); + if( !CreateDirectory( path, NULL ) ) + { + if( GetLastError() != ERROR_ALREADY_EXISTS ) + { + Com_Printf("Unable to create directory \"%s\"\n", path); + return NULL; + } + } + return path; } char *Sys_DefaultInstallPath(void) -- cgit