File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1894,6 +1894,13 @@ static int l_Exit(lua_State* L)
18941894 return 0 ;
18951895}
18961896
1897+ static int l_TakeScreenshot (lua_State* L)
1898+ {
1899+ ui_main_c* ui = GetUIPtr (L);
1900+ ui->sys ->con ->Execute (" screenshot" );
1901+ return 0 ;
1902+ }
1903+
18971904// ==============================
18981905// Library and API Initialisation
18991906// ==============================
@@ -2067,6 +2074,7 @@ int ui_main_c::InitAPI(lua_State* L)
20672074 ADDFUNC (SpawnProcess);
20682075 ADDFUNC (OpenURL);
20692076 ADDFUNC (SetProfiling);
2077+ ADDFUNC (TakeScreenshot);
20702078 ADDFUNC (Restart);
20712079 ADDFUNC (Exit);
20722080 lua_getglobal (L, " os" );
Original file line number Diff line number Diff line change @@ -515,9 +515,6 @@ void ui_main_c::KeyEvent(int key, int type)
515515 break ;
516516 case KE_KEYUP:
517517 switch (key) {
518- case KEY_PRINTSCRN:
519- sys->con ->Execute (" screenshot" );
520- break ;
521518 case KEY_F10:
522519 renderer->ToggleDebugImGui ();
523520 break ;
You can’t perform that action at this time.
0 commit comments