Add Reset(s) buttons.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
parent
11c44233b4
commit
b56ccf8eb4
4 changed files with 33 additions and 3 deletions
|
@ -82,6 +82,12 @@ namespace common2
|
|||
DestroyEmulator();
|
||||
}
|
||||
|
||||
void CommonFrame::Restart()
|
||||
{
|
||||
Destroy();
|
||||
Initialize();
|
||||
}
|
||||
|
||||
BYTE* CommonFrame::GetResource(WORD id, LPCSTR lpType, DWORD expectedSize)
|
||||
{
|
||||
myResource.clear();
|
||||
|
|
|
@ -14,6 +14,7 @@ namespace common2
|
|||
|
||||
void Initialize() override;
|
||||
void Destroy() override;
|
||||
void Restart() override;
|
||||
|
||||
BYTE* GetResource(WORD id, LPCSTR lpType, DWORD expectedSize) override;
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "Speaker.h"
|
||||
#include "Mockingboard.h"
|
||||
#include "Registry.h"
|
||||
#include "Utilities.h"
|
||||
#include "Memory.h"
|
||||
|
||||
#include "Debugger/Debug.h"
|
||||
|
@ -152,7 +153,7 @@ namespace
|
|||
namespace sa2
|
||||
{
|
||||
|
||||
void ImGuiSettings::showSettings()
|
||||
void ImGuiSettings::showSettings(SDLFrame* frame)
|
||||
{
|
||||
if (ImGui::Begin("Settings", &myShowSettings))
|
||||
{
|
||||
|
@ -177,7 +178,29 @@ namespace sa2
|
|||
ImGui::Checkbox("Show Demo", &myShowDemo);
|
||||
ImGui::SameLine(); HelpMarker("Show Dear ImGui DemoWindow.");
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::Text("FPS: %d", int(io.Framerate));
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::Button("Reboot"))
|
||||
{
|
||||
frame->Restart();
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("ResetMachineState"))
|
||||
{
|
||||
ResetMachineState();
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("CtrlReset"))
|
||||
{
|
||||
CtrlReset();
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
|
||||
|
@ -396,7 +419,7 @@ namespace sa2
|
|||
{
|
||||
if (myShowSettings)
|
||||
{
|
||||
showSettings();
|
||||
showSettings(frame);
|
||||
}
|
||||
|
||||
if (myShowMemory)
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace sa2
|
|||
|
||||
std::vector<SoundInfo> myAudioInfo;
|
||||
|
||||
void showSettings();
|
||||
void showSettings(SDLFrame* frame);
|
||||
void showDebugger(SDLFrame* frame);
|
||||
void showMemory();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue