Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kill / suspend MP when Steam starts #7

Closed
motey opened this issue Apr 7, 2013 · 7 comments
Closed

Kill / suspend MP when Steam starts #7

motey opened this issue Apr 7, 2013 · 7 comments
Milestone

Comments

@motey
Copy link
Owner

motey commented Apr 7, 2013

Option to kill MP when steam starts (maybe increases Gaming perfomance) (Add tip to link MP in Steam to get back to MP)

@motey
Copy link
Owner Author

motey commented May 7, 2013

Hatte halt gehofft, daß die MP-Api eine Methode anbietet um einen shutdown-Befehl auszulösen. Schaut aber nicht so aus, nachdem ich mich mal ein bischen durch den Code gewühlt habe.
Plan B war jetzt den Code von http://www.team-mediaportal.com/extensions/other/powerscheduler zu durchwühlen, weil das Plugin, wenn ich es recht in Erinnerung habe, anbietet MP zu schließen. Leider hab ich auf die schnelle den Quellcode nicht gefunden.

@motey
Copy link
Owner Author

motey commented May 21, 2013

@motey
Copy link
Owner Author

motey commented Jun 12, 2013

I think a simple process will do it

@motey
Copy link
Owner Author

motey commented Mar 11, 2014

found this method in myEmulator2
http://myemulators2.googlecode.com/svn/trunk/Launcher/Executor.cs:

/* The following code was referenced from the Moving Pictures plugin */

static void suspendMP(bool suspend)
    {
        if (suspend) //suspend and hide MediaPortal
        {
            Logger.LogDebug("Suspending MediaPortal...");
            // disable mediaportal input devices
            InputDevices.Stop();

            // hide mediaportal and suspend rendering to save resources for the pc game
            GUIGraphicsContext.BlankScreen = true;
            GUIGraphicsContext.form.Hide();
            GUIGraphicsContext.CurrentState = GUIGraphicsContext.State.SUSPENDING;
        }
        else //resume Mediaportal
        {
            Logger.LogDebug("Resuming MediaPortal...");

            InputDevices.Init();
            // Resume Mediaportal rendering
            GUIGraphicsContext.BlankScreen = false;
            GUIGraphicsContext.form.Show();
            GUIGraphicsContext.ResetLastActivity();
            GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_GETFOCUS, 0, 0, 0, 0, 0, null);
            GUIWindowManager.SendThreadMessage(msg);
            GUIGraphicsContext.CurrentState = GUIGraphicsContext.State.RUNNING;
        }
    }

We could implement the Option to supsend MediaPortal instead of Killing it. looks very simple

@jensbuehl
Copy link
Contributor

Just commited the suspend / resume. It works if you exit Steam but not if you choose "exit to desktop" -> in that case steam is still running in tray -> MP is not resumed!

I think we have to fix this or at least make it optional.

@jensbuehl
Copy link
Contributor

Also did the configuration part yesterday. Just have to test it and will commit it somewhen this week...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants