mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-03-21 18:21:08 +00:00
Use BufferCommandText() in win_syscon.cpp
Get rid of the dependency of the local event queue.
This commit is contained in:
parent
44b35ccf13
commit
95233c470b
1 changed files with 2 additions and 5 deletions
|
@ -99,7 +99,6 @@ typedef struct {
|
|||
static WinConData s_wcd;
|
||||
|
||||
static LONG WINAPI ConWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
char *cmdString;
|
||||
static bool s_timePolarity;
|
||||
|
||||
switch (uMsg) {
|
||||
|
@ -110,8 +109,7 @@ static LONG WINAPI ConWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
break;
|
||||
case WM_CLOSE:
|
||||
if ( cvarSystem->IsInitialized() && com_skipRenderer.GetBool() ) {
|
||||
cmdString = Mem_CopyString( "quit" );
|
||||
Sys_QueEvent( 0, SE_CONSOLE, 0, 0, strlen( cmdString ) + 1, cmdString );
|
||||
cmdSystem->BufferCommandText(CMD_EXEC_APPEND, "quit\n");
|
||||
} else if ( s_wcd.quitOnClose ) {
|
||||
PostQuitMessage( 0 );
|
||||
} else {
|
||||
|
@ -148,8 +146,7 @@ static LONG WINAPI ConWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
if ( s_wcd.quitOnClose ) {
|
||||
PostQuitMessage( 0 );
|
||||
} else {
|
||||
cmdString = Mem_CopyString( "quit" );
|
||||
Sys_QueEvent( 0, SE_CONSOLE, 0, 0, strlen( cmdString ) + 1, cmdString );
|
||||
cmdSystem->BufferCommandText(CMD_EXEC_APPEND, "quit\n");
|
||||
}
|
||||
} else if ( wParam == CLEAR_ID ) {
|
||||
SendMessage( s_wcd.hwndBuffer, EM_SETSEL, 0, -1 );
|
||||
|
|
Loading…
Reference in a new issue