Hi, can this be what you need?
SetErrorMode(2)
SetWindowTitle( "SetVirtualResolution" )
SetWindowSize( 1024, 768, 1 )
SetWindowAllowResize( 1 )
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 0, 0, 1, 1 )
SetSyncRate( 30, 0 )
SetScissor( 0,0,0,0 )
UseNewDefaultFonts( 1 )
spr = CreateSprite(0)
SetSpriteSize(spr, 100, 100)
SetSpritePositionByOffset(spr, GetDeviceWidth()/2, GetDeviceHeight()/2)
global baseSize, width, height
baseSize = 640
width = Round(baseSize*GetDeviceWidth()/GetDeviceHeight())
height = baseSize
SetVirtualResolution( width, height )
do
if GetRawMouseLeftPressed() = 1
inc baseSize, 50
SetNewVirtualResolution()
elseif GetRawMouseRightPressed() = 1
dec baseSize, 50
SetNewVirtualResolution()
endif
print("original - width:" + str(GetDeviceWidth())+"x"+str(GetDeviceHeight()))
print("virtual - width:" + str(GetVirtualWidth())+"x"+str(GetVirtualHeight()))
if GetRawKeyPressed(27) = 1
end
endif
Print( ScreenFPS() )
Sync()
loop
function SetNewVirtualResolution()
width = Round(baseSize*GetDeviceWidth()/GetDeviceHeight())
height = baseSize
SetVirtualResolution( width, height )
endfunction
https://www.instagram.com/qugurun/