summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/files.c2
-rw-r--r--source/vid_win.c10
2 files changed, 9 insertions, 3 deletions
diff --git a/source/files.c b/source/files.c
index 039e5c1..1d5a96c 100644
--- a/source/files.c
+++ b/source/files.c
@@ -1613,7 +1613,7 @@ static void q_printf( 1, 2 ) FS_AddGameDirectory( const char *fmt, ... ) {
if( !( fs_restrict_mask->integer & 1 ) ) {
search = FS_Malloc( sizeof( searchpath_t ) + length );
search->pack = NULL;
- strcpy( search->filename, fs_gamedir );
+ memcpy( search->filename, fs_gamedir, length + 1 );
search->next = fs_searchpaths;
fs_searchpaths = search;
}
diff --git a/source/vid_win.c b/source/vid_win.c
index ca06495..38f1706 100644
--- a/source/vid_win.c
+++ b/source/vid_win.c
@@ -571,9 +571,14 @@ LONG WINAPI Win_MainWndProc ( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
win.mouse.state = temp;
}
break;
+
case WM_HOTKEY:
return FALSE;
+ case WM_PAINT:
+ SCR_UpdateScreen();
+ break;
+
case WM_CLOSE:
PostQuitMessage( 0 );
return FALSE;
@@ -672,11 +677,12 @@ LONG WINAPI Win_MainWndProc ( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
Win_KeyEvent( wParam, lParam, qtrue );
return FALSE;
-#ifdef USE_CHAR_EVENTS
+ case WM_SYSCHAR:
case WM_CHAR:
+#if USE_CHAR_EVENTS
Key_CharEvent( wParam );
- break;
#endif
+ return FALSE;
case WM_SYSKEYUP:
case WM_KEYUP: