summaryrefslogtreecommitdiff
path: root/src/win32
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2006-08-14 21:11:20 +0000
committerTim Angus <tim@ngus.net>2006-08-14 21:11:20 +0000
commit77c1837c789c50ed8fa80f6a862d33387e432125 (patch)
tree215051df23ce8287de47aba48fc685d009ffefe9 /src/win32
parent46c7999840ac513d69b98e3ded8d59869dbb2fb2 (diff)
* 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
Diffstat (limited to 'src/win32')
-rw-r--r--src/win32/win_glimp.c4
-rw-r--r--src/win32/win_local.h1
-rw-r--r--src/win32/win_shared.c21
3 files changed, 23 insertions, 3 deletions
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 <dsound.h>
#include <winsock.h>
#include <wsipx.h>
+#include <shlobj.h>
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)