Skip to content

Commit

Permalink
add handles for app suspending/resuming to config page
Browse files Browse the repository at this point in the history
  • Loading branch information
duchuule committed Aug 19, 2015
1 parent 19f662e commit 9c5c675
Show file tree
Hide file tree
Showing 14 changed files with 1,045 additions and 221 deletions.
3 changes: 3 additions & 0 deletions DirectXPage.xaml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,11 +427,14 @@ void DirectXPage::OnVisibilityChanged(CoreWindow^ sender, VisibilityChangedEvent
m_main->emulator->Pause();
else
m_main->emulator->Unpause();

//m_main->emulator->HidInput->StartListening();
}
else
{
//m_main->StopRenderLoop();
m_main->emulator->Pause();
//m_main->emulator->HidInput->StopListening();
}
}

Expand Down
11 changes: 9 additions & 2 deletions Emulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <Util.h>
#include <SoundDriver.h>


using namespace Platform;
using namespace concurrency;

Expand Down Expand Up @@ -254,7 +255,7 @@ namespace VBA10
{
EnterCriticalSection(&pauseSync);
emulating = false;
this->HidInput->StopListening();

}

}
Expand All @@ -265,7 +266,6 @@ namespace VBA10
{

emulating = true;
this->HidInput->StartListening();

LeaveCriticalSection(&pauseSync);
}
Expand Down Expand Up @@ -324,10 +324,17 @@ namespace VBA10

#ifndef NO_XBOX
if (xboxElapsed < 3600.0f)
{
this->p1Controller->Update();
this->HidInput->Update();
}
#endif
this->virtualInput->Update();



//there is no need to update hidcontroller because we use event to update

/*if(timeMeasured && IsROMLoaded() && (!Settings.StopEmulation || autosaving))
{
Settings.Mute = !SoundEnabled();
Expand Down
Loading

0 comments on commit 9c5c675

Please sign in to comment.