Jump to content

View more

View more

Image of the Day

Inventory ! Va falloir trouver une autre couleur pour le cadre D: #AzTroScreenshot #screenshotsaturday https://t.co/PvxhGL7cOH
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

I can't think of a good title for my problem :(

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
6 replies to this topic

#1 Triad_prague   Members   

161
Like
0Likes
Like

Posted 27 January 2012 - 09:12 AM

Hello, sorry if I can't think of a nice title for this, but.....here is what I'm trying to do anyway:

I'd like to make an application that acts like a launcher, basically it just does these:
1. change screen resolution to 640x480
2. run the target application (an old game that won't work nicely if the screen resolution is not 640x480)
3. when the game ends, the app should restore the screen resolution

I think I can make an application that does no. 1, and call ShellExecute() or something to 'launch' the target application, but then I'm not sure how the launcher can track when the game is closed and then restore the previous screen resolution....can you give any hints on how I'm supposed to do that?
the hardest part is the beginning...

#2 Evil Steve   Members   

2016
Like
3Likes
Like

Posted 27 January 2012 - 09:16 AM

You can use CreateProcess() instead of ShellExecute(), and then you can wait on the process handle returned using WaitForSingleObject(). The process handle becomes signalled when the process terminates.

Steve Macpherson
Senior Systems Programmer

Rockstar North


#3 Triad_prague   Members   

161
Like
0Likes
Like

Posted 27 January 2012 - 10:52 AM

Whew Steve, I never thought about that!! Ok, I'll try to read those in MSDN....anyway thanks for the tips!! Posted Image

EDIT : That solved it beautifully!! Thanks Steve, I hope I can rate u twice Posted Image
the hardest part is the beginning...

#4 Antheus   Members   

2409
Like
0Likes
Like

Posted 27 January 2012 - 12:56 PM

Download QRes.

Make a batch file.
QRes /x:640 /y:480
start /wait yourapp.exe
QRes .... whatever old resolution was


#5 adeyblue   Members   

541
Like
0Likes
Like

Posted 27 January 2012 - 01:11 PM

Or, in Explorer, right click the exe->Properties->Compatibility and check 'Run in 640x480 screen resolution'

#6 Triad_prague   Members   

161
Like
0Likes
Like

Posted 27 January 2012 - 01:48 PM

Or, in Explorer, right click the exe->Properties->Compatibility and check 'Run in 640x480 screen resolution'


already tried this.....and didn't work for this particular game...which is weird, and that's why I was thinking of coding a small app to do just that :)

Download QRes.

Make a batch file.

QRes /x:640 /y:480
start /wait yourapp.exe
QRes .... whatever old resolution was


hmm thanks for the suggestion anyway :)
the hardest part is the beginning...

#7 Marvel Magnum   Members   

333
Like
0Likes
Like

Posted 27 January 2012 - 02:06 PM

You can use CreateProcess() instead of ShellExecute(),


Brilliant! I couldn't think of this too. Rated!!




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.