MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 1 » Main Features (talk, share your ideas, get support) » Watch / Listen Media » MyTV - Engine 0.2 » Tips and Tricks


Tips and Tricks Post your Tips and Tricks in here.

Reply
 
Thread Tools Display Modes
Old 2006-01-04, 23:55   #1 (permalink)
Portal Member
 
Join Date: Jan 2006
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts

Country:

My System

Default Automatically start MP fullscreen on secondary display

*** UPDATE 13/1/2007 - Works with MediaPortal 0.2.2.0 ***

Happy newyear

With the following executable (attached is also the source code) you can start MediaPortal automatically in fullscreen mode on the secondary display.

http://www.geocities.com/don_hannema/mp_start_1.4.zip (only for version 0.2.2.0)

This version does not rely on the File->Set Device option in the menu anymore, since this was removed when the final 0.2 version came out, and works like this:
1. start MediaPortal.exe
2. move the window to the second display position (e.g. 1280x0)
3. make the window fullscreen

Since, the set device option is not available I recompiled the 0.2.2 version to support a configurable device selection. Please copy the executable in the following zip over the original: http://www.geocities.com/don_hannema...al_0.2.2.0.zip

This will make sure the secondary display is the primary one. If you want to override this, you can do this by adding the following section to MediaPortal.xml
Code:
  <section name="debug">
    <entry name="adapterOrdinal">1</entry>
  </section>
A value of 0 will mean the primary display, 1 is the secondary display, 2 is your third display, etc.

Make sure that only the options "Auto hide mouse cursor in fullscreen mode when idle" and "Start Media Portal in fullscreen mode" are checked.

The program can also be started a second time, after which the focus is set to MediaPortal again. I use this program myself to activate MP with my remote control without the need to use my PC.

The code that I changed is the following in the d3dapp.cs file. From:
Code:
        // Create the device
        GUIGraphicsContext.DX9Device = new Microsoft.DirectX.Direct3D.Device(graphicsSettings.AdapterOrdinal,
                                                                             graphicsSettings.DevType,
                                                                             windowed ? ourRenderTarget : this,
                                                                             createFlags | CreateFlags.MultiThreaded,
                                                                             presentParams);
To:
Code:
        int adapterOrdinal = 1;

        using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml")))
        {
            adapterOrdinal = xmlreader.GetValueAsInt("debug", "adapterOrdinal", 1);
        }

        // Create the device
        GUIGraphicsContext.DX9Device = new Microsoft.DirectX.Direct3D.Device(adapterOrdinal,
                                                                             graphicsSettings.DevType,
                                                                             windowed ? ourRenderTarget : this,
                                                                             createFlags | CreateFlags.MultiThreaded,
                                                                             presentParams);

The old version for MediaPortal 0.2.0.0 RC2 & RC3 is also still available here: http://www.geocities.com/don_hannema/mp_start_1.2.zip

This version assumes that the File->Set Device option in the menu is available and works in the following way:
1. start MediaPortal.exe
2. wait for the window to start and then open the Device Settings
3. select the second display
4. move the window to the second display position (e.g. 1280x0)
5. make the window fullscreen

Last edited by dhannema; 2007-01-13 at 16:14. Reason: Fix for 0.2.2.0
dhannema is offline   Reply With Quote
Old 2006-01-05, 05:35   #2 (permalink)
Portal Member
 
Join Date: Aug 2005
Location: Melbourne, Australia
Age: 22
Posts: 707
Thanks: 0
Thanked 0 Times in 0 Posts

My System

Default

Am I right in thinking that this will only work with 1280 wide resolutions? It would be good to make that configurable somehow, I think.
jawbroken is offline   Reply With Quote
Old 2006-01-05, 06:05   #3 (permalink)
Portal Member
 
tkortell's Avatar
 
Join Date: Apr 2005
Location: Vaasa / Sulva
Age: 28
Posts: 318
Thanks: 6
Thanked 0 Times in 0 Posts

Country:

My System

Default

I'm confused :? do you mean MediaPlayer or MediaPortal?? Or can it be used on any exe file?

Regards // Tomas
tkortell is offline   Reply With Quote
Old 2006-01-05, 08:19   #4 (permalink)
Portal Member
 
Join Date: Jan 2006
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts

Country:

My System

Default

Quote:
Originally Posted by tkortell
I'm confused :? do you mean MediaPlayer or MediaPortal?? Or can it be used on any exe file?

Regards // Tomas
Sorry guys, I mean MediaPortal. I've edited the post.

I agree that nothing should be hardcoded (e.g. the 1280), but since I first wanted to know if others would find it useful, I didn't spend time making things configurable.
dhannema is offline   Reply With Quote
Old 2006-01-05, 08:34   #5 (permalink)
Portal Member
 
Join Date: Aug 2005
Location: Melbourne, Australia
Age: 22
Posts: 707
Thanks: 0
Thanked 0 Times in 0 Posts

My System

Default

I'm sure some people will find it very useful, but I only have the single display. Perhaps just a simple command line argument to replace the 1280 would be useful? The same thing would work for the path to MediaPortal as well.
jawbroken is offline   Reply With Quote
Old 2006-01-05, 20:08   #6 (permalink)
Portal Member
 
Join Date: Jan 2006
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts

Country:

My System

Default

Quote:
Originally Posted by jawbroken
I'm sure some people will find it very useful, but I only have the single display. Perhaps just a simple command line argument to replace the 1280 would be useful? The same thing would work for the path to MediaPortal as well.
OK, I just added automatic detection of your screen size and I made the path an optional command line parameter.
Now, if you omit the first arugment (therefore start without any arguments) it will try to start MediaPlayer from the default location.
dhannema is offline   Reply With Quote
Old 2006-01-06, 11:05   #7 (permalink)
Portal Member
 
tkortell's Avatar
 
Join Date: Apr 2005
Location: Vaasa / Sulva
Age: 28
Posts: 318
Thanks: 6
Thanked 0 Times in 0 Posts

Country:

My System

Default

Good work
tkortell is offline   Reply With Quote
Old 2006-01-07, 06:51   #8 (permalink)
Portal Member
 
Join Date: Dec 2005
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts


Default

(* click *)

Trying now. will post results later.
GlobalFusion is offline   Reply With Quote
Old 2006-01-07, 19:55   #9 (permalink)
Portal Member
 
Join Date: Jan 2006
Posts: 66
Thanks: 0
Thanked 5 Times in 2 Posts

Country:


Default

First of all thanks for your work, been waiting along time for this

However it seems to hang when starting(99% cpuload load from mpstart.exe), it happends when mediaportal is intializing the skin and it says waiting for popup in the mpstart.exe).

When i close mpstart.exe mediaportal goes further and does open the device properties(but does only open it)
Hoping you can fix this , my config:

Mediaportal 2.0 RC2
Nvidia 6600 GT -> Dualview mode, CRT primary 1024x768, TV secondary 800x600

Also another tiny question how can you make mpstart.exe run with the media center 2005 remote(green button now loads MS mce2005)?
Rick164 is offline   Reply With Quote
Old 2006-01-07, 22:12   #10 (permalink)
Portal Member
 
Join Date: May 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts


Default

Quote:
Originally Posted by dhannema
OK, I just added automatic detection of your screen size and I made the path an optional command line parameter.
Now, if you omit the first arugment (therefore start without any arguments) it will try to start MediaPlayer from the default location.
Hi, I would be extremely grateful to get this up and running on my system. I have looked for this kind of soultion for a long time now.

I just wonder how I should change the the location of Media portal, do I have to install Borland Builder on my comp to change this myself, or is there an easier way?
Hammer9600 is offline   Reply With Quote
Reply

Bookmarks

Tags
automatically, display, fullscreen, secondary

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Autotune doesn't find any channels friedit Installation, configuration support 2 2007-01-02 14:34
Recording from TV 'Arry General Support 2 2006-09-20 01:12
Cant get MyTV to work (2.0 RC3)? mdolan General Support 3 2006-03-30 15:58
After first time entering .apefolder all files is unknown. PHN2 The old Bugreport Forum 1 2006-03-15 17:28


All times are GMT +1. The time now is 19:46.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden