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)
1894
1894
return 0 ;
1895
1895
}
1896
1896
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
+
1897
1904
// ==============================
1898
1905
// Library and API Initialisation
1899
1906
// ==============================
@@ -2067,6 +2074,7 @@ int ui_main_c::InitAPI(lua_State* L)
2067
2074
ADDFUNC (SpawnProcess);
2068
2075
ADDFUNC (OpenURL);
2069
2076
ADDFUNC (SetProfiling);
2077
+ ADDFUNC (TakeScreenshot);
2070
2078
ADDFUNC (Restart);
2071
2079
ADDFUNC (Exit);
2072
2080
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)
515
515
break ;
516
516
case KE_KEYUP:
517
517
switch (key) {
518
- case KEY_PRINTSCRN:
519
- sys->con ->Execute (" screenshot" );
520
- break ;
521
518
case KEY_F10:
522
519
renderer->ToggleDebugImGui ();
523
520
break ;
You can’t perform that action at this time.
0 commit comments