[Snippet] Get Display Settings

(Get Display resolution)

Code:
call @GetResolution 0 1@ 2@
:GetResolution
0A8D: 0@ = read_memory 0xC9C040 size 4 virtual_protect 0 //X
0A8D: 1@ = read_memory 0xC9C044 size 4 virtual_protect 0 //Y
ret 2 0@ 1@  

Getting display inches:
Code:
call @DisplayInch 0 1@

:DisplayInch
0A8D: 0@ = read_memory 0xC9C048 size 4 virtual_protect 0
ret 1 0@


(DisplayRefresh)
Code:
call @DisplayRefresh 0 1@

:DisplayRefresh
0A8D: 0@ = read_memory 0xC9C070 size 4 virtual_protect 0
ret 1 0@

(To verify if the game running in window or not)

Code:
call @isWindowMode 0

:isWindowMode
0A8D: 0@ = read_memory 0xC9C060 size 4 virtual_protect 0
if 0@ == 1
    then ret 0 1
end
ret 0 0


(Turn the game into windowed)

Code:
0ab1: call @SetWinMode 0

:SetWinMode
0A8C: 0xc9c060 4 0x1 1
0A8C: 0xc9c070 4 0x0 1
ret 0
 
Top