Game Development Community

How can I load my resolution saved from my prefs.cs

by Cheryl Gress · in Torque Game Builder · 03/28/2009 (4:59 pm) · 2 replies

I have my game loading my values saved from my prefs.cs I can tell it's working because my mouse sensitivity echos back correctly. But my screen resolution is always being reverted back to what I developed it at. Has anyone gotten this to work or do end user constantly have to change their video settings?

#1
04/02/2009 (2:43 pm)
Check the following file:

common/commonConfig.xml

The data here get's loaded into

$Game::Resolution

for resolution and saved back out. This might be the overriding resolution and game data set.
#2
04/05/2009 (7:47 pm)
I got it working

I put this in my common.cs

exec(expandFileName("game/gameScripts/preferences/prefs.cs"));

just before canvas.cs

and my canvas.cs has

%goodres = $pref::Video::Resolution;