PDA

View Full Version : Change resolution at startup, restore on exit


Nazgulled
2009-02-06, 00:13
Hi,

I use my HTPC for things other than multimedia stuff and I normally access it through remote administration. For this, I run the system with a resolution at 1280x720, but I like to run XBMC and watch videos in the highest resolution possible that my TV allows me to and that is 1920x1080.

Manually switching resolutions every time I log in by remote administration and need to run XBMC is a pain... Why not change the desktop resolution (to whatever the user defined in the settings) when running XBMC and restore this resolution when exiting XBMC?

I use Windows but I guess this is a feature that could be implemented in all OS's?

By the way, for anyone that has interest in this and while this is not possible in the current XBMC version (as far as I know), I'm doing this with the help of VB scripting and nice little tool called "Display Changer". Basically, I run the following script instead of running "XBMC.exe":

Const COMPUTER = "."

Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & COMPUTER & "\root\cimv2")
Set listProcesses = objWMIService.ExecQuery ("SELECT * FROM Win32_Process")

mpProcess = False

For Each objProcess in listProcesses
If (StrComp(objProcess.Name, "XBMC.exe", 1) = 0) Then
mpProcess = True
Exit For
End If
Next

set wshShell = WScript.CreateObject("WScript.Shell")

If mpProcess = False Then
WshShell.Run("""C:\Program Files\Display Changer\dc.exe"" " & _
"-width=1920 -height=1080 -depth=32 -refresh=50 " & _
"""C:\Program Files\XBMC\XBMC.exe"" -fs -p")
Else
WshShell.Run("""C:\Program Files\XBMC\XBMC.exe"" -fs -p")
End If

WScript.Quit

topfs2
2009-02-06, 02:27
This works for me, just set the lower resolution in windows and in xbmc settings choose the higher resolution with fullscreen appended.

This makes xbmc use switch resolution at start for me

Cheers,
Tobias

Nazgulled
2009-02-06, 03:22
Is it supposed to work on the final 8.10 version or a specific SVN? I'm not using an SVN build and it doesn't seem to be working on my end... I need to set the resolution to "auto" and use the script above to launch XBMC, otherwise, it won't work with me... :/

Nazgulled
2009-02-20, 18:23
I just installed Jester's SVN Rev17890 and this still ain't working on my machine...

I see that now, we have a bunch of resolution with refresh frequency to select from (I guess this is because of the new "adjust framerate" feature) and I've tried with a few of the options but it's still not working.

I always set my desktop resolution to 1280x720 @ 50Hz (so I can easily use remote administration with my laptop) but I want to run XBMC at 1920x1080 @ 50Hz and I expect the resolution to revert back to 1280x720 @ 50Hz when I exit XBMC.

For this, I've tried to use the following options:
1080i 16:9 and 1920x1080 @ 50.00Hz

XBMC successfully changes to 1920x1080 when I run it, but it doesn't put it back to 1280x720 when I exit. This happens with both with "1080i 16:9" and "1920x1080 @ 50.00Hz".

There's also another resolution option that has "(Full Screen)" and I also tried this one, but this one seems to be working like the "Auto" option... What I mean is that, for instance, if I have the desktop resolution set 1280x720 @ 50.00Hz and I run XBMC, the resolution option name will be "1280x720 @ 50.00Hz (Full Screen)" and not "1920x1080 @ 50.00Hz (Full Screen)" like it was before, when the desktop resolution was 1920x1080. Is this a bug or is it supposed to have some kind of beahvior that I'm missing?

Anyway, what can possibly be the cause for the resolution not go back when I close XBMC?

Nazgulled
2009-02-21, 00:36
Please ignore the above post... I just did new testing and it's actually working just fine, there's only one slight problem...

I'm going to create a new topic with a new title to be more specific, cause the problem is different now. The problem about this thread's topic, is solved now :)