more SDL2-related backports from sauer

* use keyrepeat and textinput switch code from sauer (on windows, opening
  a console with "t" also produced a "t" as text otherwise)
* screenw and screenh are now cubescript-variables that always reflect
  the actual resolution of the screen or the window

DOCREF screenw screenh
This commit is contained in:
ac-stef
2018-02-10 11:28:49 +01:00
committed by aurhat
parent f0f8eac770
commit 19bb560dd2
6 changed files with 55 additions and 46 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ void toggleedit(bool force)
//put call to clear/restart gamemode
player1->attacking = false;
}
keyrepeat = editmode;
keyrepeat(editmode, KR_EDITMODE);
editing = editmode ? 1 : 0;
editing_sp = editmode && !multiplayer(NULL) ? 1 : 0;
player1->state = editing ? CS_EDITING : (watchingdemo ? CS_SPECTATE : CS_ALIVE);