I have some values stored in a file,and for some reason they are not being read correctly.
Here is the function that reads the file, and below it is an example of what the file would look like.
The window is shrinking so that you can only see the top bar with the minimize restore and close buttons, and its really thin and tiny, and also when I restore the window, the display hasnt changed either. The only thing that is working is the re positioning of the window.
void LobbySettings(void){
dbOpenToRead (1,"PreSettings.xmf");
while(dbFileEnd(1) != 1){
strAppTitle = dbReadString(1);
dbSetWindowTitle(strAppTitle);
strCurrentLine = dbReadString(1);
intDisplayWidth = atoi(strCurrentLine);
strCurrentLine = dbReadString(1);
intDisplayHeight = atoi(strCurrentLine);
strCurrentLine = dbReadString(1);
intDisplayDepth = atoi(strCurrentLine);
strCurrentLine = dbReadString(1);
intLobbyWindowX = atoi(strCurrentLine);
strCurrentLine = dbReadString(1);
intLobbyWindowY = atoi(strCurrentLine);
strCurrentLine = dbReadString(1);
intLobbyWindowWidth = atoi(strCurrentLine);
strCurrentLine = dbReadString(1);
intLobbyWindowHeight = atoi(strCurrentLine);
dbSetWindowPosition(intLobbyWindowX,intLobbyWindowY);
dbSetDisplayMode(intDisplayWidth,intDisplayHeight,intDisplayDepth);
dbSetWindowSize(intLobbyWindowWidth,intLobbyWindowHeight);
}
dbCloseFile(1);
}
Test App
800
600
16
400
400
200
200