Skip to content

Commit c3860c9

Browse files
committed
Merge branch 'master' into angle-meld
2 parents 19cca6d + 8fb2045 commit c3860c9

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

engine/render/r_main.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1710,7 +1710,10 @@ void r_renderer_c::DoScreenshot(image_c* i, const char* ext)
17101710
// curTimeSt.tm_mon+1, curTimeSt.tm_mday, curTimeSt.tm_year%100,
17111711
// curTimeSt.tm_hour, curTimeSt.tm_min, curTimeSt.tm_sec, ext);
17121712

1713-
// Save image
1713+
// Make folder if it doesn't exist
1714+
_mkdir(CFG_DATAPATH "Screenshots");
1715+
1716+
// Save image
17141717
if (i->Save(ssname.c_str())) {
17151718
sys->con->Print("Couldn't write screenshot!\n");
17161719
}

engine/system/win/sys_console.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ void sys_console_c::ThreadProc()
171171
UnregisterClass(CFG_SCON_TITLE " Class", sys->hinst);
172172

173173
isRunning = false;
174+
175+
// Flush windowless messages (Like WM_QUIT)
176+
sys->RunMessages();
174177
}
175178

176179
sys_console_c::~sys_console_c()
@@ -201,6 +204,7 @@ LRESULT __stdcall sys_console_c::WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPA
201204
}
202205
case WM_CLOSE:
203206
// Quit
207+
conWin->doRun = false;
204208
PostQuitMessage(0);
205209
return FALSE;
206210
}

engine/system/win/sys_main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ static const byte sys_keyRemap[] = {
348348
0, // 5D VK_APPS
349349
0, // 5E -
350350
0, // 5F VK_SLEEP
351-
0, // 60 VK_NUMPAD0
351+
'0', // 60 VK_NUMPAD0
352352
0, // 61 VK_NUMPAD1
353353
0, // 62 VK_NUMPAD2
354354
0, // 63 VK_NUMPAD3
@@ -359,9 +359,9 @@ static const byte sys_keyRemap[] = {
359359
0, // 68 VK_NUMPAD8
360360
0, // 69 VK_NUMPAD9
361361
0, // 6A VK_MULTIPLY
362-
0, // 6B VK_ADD
362+
'+', // 6B VK_ADD
363363
0, // 6C VK_SEPARATOR
364-
0, // 6D VK_SUBTRACT
364+
'-', // 6D VK_SUBTRACT
365365
0, // 6E VK_DECIMAL
366366
0, // 6F VK_DIVIDE
367367
KEY_F1, // 70 VK_F1

ui_console.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ void ui_console_c::Hide()
9898

9999
bool ui_console_c::KeyEvent(int key, int type)
100100
{
101-
if (type == KE_KEYDOWN && key == '`' && sys->IsKeyDown(KEY_CTRL)) {
101+
if (type == KE_KEYDOWN && (key == '`' || key == KEY_F1) && sys->IsKeyDown(KEY_CTRL)) {
102102
Toggle();
103103
return true;
104104
}

ui_subscript.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,10 @@ bool ui_subscript_c::Start()
313313
lua_pushlightuserdata(L, this);
314314
lua_rawseti(L, LUA_REGISTRYINDEX, 0);
315315
lua_pushcfunction(L, traceback);
316+
317+
lua_pushboolean(L, 1);
318+
lua_setfield(L, LUA_REGISTRYINDEX, "LUA_NOENV");
319+
316320
// Add libraries and APIs
317321
lua_gc(L, LUA_GCSTOP, 0);
318322
luaL_openlibs(L);

0 commit comments

Comments
 (0)