> So where do I put this code to make it work in the game? I would like to see
> what this code does so how can we get it working?
i'm not sure if i'm getting your question, but if it is about how you can use it inside the game:
well, you can use it for example in the stratagus.lua:
...
local defaultPreferences = {
...
VideoWidth = GetCurrentResolution()[1],
VideoHeight = GetCurrentResolution()[2],
...
}
...
that will give you your native resolution as default. so if the game supports it and you don't specify a particular resolution, you will always have the native one, regardles what monitor you are using.
GetAvailableResolutions allows to build a dynamic list of resolutions in the options menu.
this will print them to stdout:
if GetAvailableResolutions() then
for _,v in ipairs(GetAvailableResolutions()) do
print(v[1]..'x'..v[2])
end
end
> So where do I put this code to make it work in the game? I would like to see
> what this code does so how can we get it working?
i'm not sure if i'm getting your question, but if it is about how you can use it inside the game:
well, you can use it for example in the stratagus.lua: ution() [1], ution() [2],
...
local defaultPreferences = {
...
VideoWidth = GetCurrentResol
VideoHeight = GetCurrentResol
...
}
...
that will give you your native resolution as default. so if the game supports it and you don't specify a particular resolution, you will always have the native one, regardles what monitor you are using.
GetAvailableRes olutions allows to build a dynamic list of resolutions in the options menu.
this will print them to stdout:
if GetAvailableRes olutions( ) then GetAvailableRes olutions( )) do v[1]..' x'..v[2] )
for _,v in ipairs(
print(
end
end