UI: Fixed input hud being shown behind game select screen after using power off
This commit is contained in:
parent
ff95758a87
commit
dc3202fbfc
5 changed files with 12 additions and 7 deletions
|
@ -146,7 +146,7 @@ shared_ptr<BaseControlDevice> ControlManager::CreateExpansionDevice(ExpansionPor
|
|||
case ExpansionPortDevice::OekaKidsTablet: device.reset(new OekaKidsTablet()); break;
|
||||
case ExpansionPortDevice::FamilyTrainerMat: device.reset(new FamilyMatTrainer(EmulationSettings::GetControllerKeys(0))); break;
|
||||
case ExpansionPortDevice::KonamiHyperShot: device.reset(new KonamiHyperShot(EmulationSettings::GetControllerKeys(0), EmulationSettings::GetControllerKeys(1))); break;
|
||||
case ExpansionPortDevice::FamilyBasicKeyboard: device.reset(new FamilyBasicKeyboard(EmulationSettings::GetControllerKeys(0))); break; //TODO: tape reader
|
||||
case ExpansionPortDevice::FamilyBasicKeyboard: device.reset(new FamilyBasicKeyboard(EmulationSettings::GetControllerKeys(0))); break;
|
||||
case ExpansionPortDevice::PartyTap: device.reset(new PartyTap(EmulationSettings::GetControllerKeys(0))); break;
|
||||
case ExpansionPortDevice::Pachinko: device.reset(new PachinkoController(EmulationSettings::GetControllerKeys(0))); break;
|
||||
case ExpansionPortDevice::ExcitingBoxing: device.reset(new ExcitingBoxingController(EmulationSettings::GetControllerKeys(0))); break;
|
||||
|
|
|
@ -925,8 +925,10 @@ public:
|
|||
|
||||
static void DisableOverclocking(bool disabled)
|
||||
{
|
||||
_disableOverclocking = disabled;
|
||||
UpdateEffectiveOverclockRate();
|
||||
if(_disableOverclocking != disabled) {
|
||||
_disableOverclocking = disabled;
|
||||
UpdateEffectiveOverclockRate();
|
||||
}
|
||||
}
|
||||
|
||||
static uint32_t GetOverclockRateSetting()
|
||||
|
|
|
@ -124,8 +124,9 @@ void VideoDecoder::DecodeFrame(bool synchronous)
|
|||
frameInfo = _scaleFilter->GetFrameInfo(frameInfo);
|
||||
}
|
||||
|
||||
VideoHud hud;
|
||||
hud.DrawHud((uint8_t*)outputBuffer, frameInfo, _videoFilter->GetOverscan());
|
||||
if(_hud) {
|
||||
_hud->DrawHud((uint8_t*)outputBuffer, frameInfo, _videoFilter->GetOverscan());
|
||||
}
|
||||
|
||||
ScreenSize screenSize;
|
||||
GetScreenSize(screenSize, true);
|
||||
|
@ -209,7 +210,7 @@ void VideoDecoder::StartThread()
|
|||
_frameChanged = false;
|
||||
_frameCount = 0;
|
||||
_waitForFrame.Reset();
|
||||
|
||||
_hud.reset(new VideoHud());
|
||||
_decodeThread.reset(new thread(&VideoDecoder::DecodeThread, this));
|
||||
}
|
||||
}
|
||||
|
@ -223,6 +224,7 @@ void VideoDecoder::StopThread()
|
|||
|
||||
_decodeThread.reset();
|
||||
|
||||
_hud.reset();
|
||||
_hdScreenTiles = nullptr;
|
||||
EmulationSettings::SetPpuModel(PpuModel::Ppu2C02);
|
||||
UpdateVideoFilter();
|
||||
|
|
|
@ -12,6 +12,7 @@ class BaseVideoFilter;
|
|||
class ScaleFilter;
|
||||
class RotateFilter;
|
||||
class IRenderingDevice;
|
||||
class VideoHud;
|
||||
struct HdPpuPixelInfo;
|
||||
|
||||
struct ScreenSize
|
||||
|
@ -31,6 +32,7 @@ private:
|
|||
bool _hdFilterEnabled = false;
|
||||
|
||||
unique_ptr<thread> _decodeThread;
|
||||
unique_ptr<VideoHud> _hud;
|
||||
|
||||
AutoResetEvent _waitForFrame;
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ void VideoHud::DrawHud(uint8_t *outputBuffer, FrameInfo frameInfo, OverscanDimen
|
|||
uint32_t displayCount = 0;
|
||||
InputDisplaySettings settings = EmulationSettings::GetInputDisplaySettings();
|
||||
|
||||
//TODO: FIX
|
||||
vector<ControlDeviceState> states = ControlManager::GetPortStates();
|
||||
for(int inputPort = 0; inputPort < 4; inputPort++) {
|
||||
if((settings.VisiblePorts >> inputPort) & 0x01) {
|
||||
|
|
Loading…
Add table
Reference in a new issue