[516] Scaling and TGUI fixes (#28809)

* [516] Scaling and TGUI fixes

* fuck it we go with this

* ???

* final changes

* whoops
This commit is contained in:
Contrabang
2025-03-27 03:31:43 -04:00
committed by GitHub
parent 05e7754afb
commit 3fca5f8216
11 changed files with 47 additions and 8 deletions
+3
View File
@@ -232,3 +232,6 @@
/// Cache of MD5'd UIDs. This is to stop clients from poking at object UIDs and being exploity with them
var/list/m5_uid_cache = list()
/// If this client has any windows scaling applied
var/window_scaling
+11
View File
@@ -414,6 +414,8 @@
to_chat(src, message)
GLOB.clientmessages.Remove(ckey)
acquire_dpi()
if(SSinput.initialized)
set_macros()
@@ -1327,6 +1329,15 @@
to_chat(src, "All sounds stopped.")
tgui_panel?.stop_music()
/client/proc/acquire_dpi()
set waitfor = FALSE
// Remove with 516
if(byond_version < 516)
return
window_scaling = text2num(winget(src, null, "dpi"))
#undef LIMITER_SIZE
#undef CURRENT_SECOND
#undef SECOND_COUNT