Update scaling in History Viewer
This commit is contained in:
parent
40d4e21cb1
commit
117e6265b0
4 changed files with 12 additions and 2 deletions
|
@ -132,6 +132,12 @@ extern "C" {
|
|||
GetConsoleById(consoleId)->GetSettings()->SetAudioConfig(config);
|
||||
}
|
||||
|
||||
DllExport void __stdcall SetVideoScale(double scale, ConsoleId consoleId) {
|
||||
VideoConfig config = GetConsoleById(consoleId)->GetSettings()->GetVideoConfig();
|
||||
config.VideoScale = scale;
|
||||
GetConsoleById(consoleId)->GetSettings()->SetVideoConfig(config);
|
||||
}
|
||||
|
||||
|
||||
DllExport void __stdcall SetFullscreenMode(bool fullscreen, void *windowHandle, uint32_t monitorWidth, uint32_t monitorHeight)
|
||||
{
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "../Core/SoundMixer.h"
|
||||
#include "../Core/MovieManager.h"
|
||||
#include "../Core/RewindManager.h"
|
||||
#include "../Core/EmuSettings.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "../Windows/Renderer.h"
|
||||
|
@ -41,9 +42,11 @@ extern "C"
|
|||
_historyConsole->Unlock();
|
||||
|
||||
//Force some settings
|
||||
VideoConfig config = _historyConsole->GetSettings()->GetVideoConfig();
|
||||
config.VideoScale = 2;
|
||||
_historyConsole->GetSettings()->SetVideoConfig(config);
|
||||
// TODO
|
||||
// _historyConsole->GetSettings()->SetEmulationSpeed(100);
|
||||
// _historyConsole->GetSettings()->SetVideoScale(2);
|
||||
// _historyConsole->GetSettings()->ClearFlags(EmulationFlags::InBackground | EmulationFlags::Rewind /*|EmulationFlags::ForceMaxSpeed | EmulationFlags::DebuggerWindowEnabled*/);
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -102,7 +102,7 @@ namespace Mesen.GUI.Forms
|
|||
double verticalScale = (double)dimensions.Height / size.Height;
|
||||
double horizontalScale = (double)dimensions.Width / size.Width;
|
||||
double scale = Math.Min(verticalScale, horizontalScale);
|
||||
// InteropEmu.SetVideoScale(scale, InteropEmu.ConsoleId.HistoryViewer); TODO
|
||||
EmuApi.SetVideoScale(scale, EmuApi.ConsoleId.HistoryViewer);
|
||||
}
|
||||
|
||||
private void tmrUpdatePosition_Tick(object sender, EventArgs e)
|
||||
|
|
|
@ -37,6 +37,7 @@ namespace Mesen.GUI
|
|||
}
|
||||
|
||||
[DllImport(DllPath)] public static extern void SetMasterVolume(double volume, ConsoleId consoleId);
|
||||
[DllImport(DllPath)] public static extern void SetVideoScale(double scale, ConsoleId consoleId);
|
||||
|
||||
[DllImport(DllPath)] public static extern IntPtr RegisterNotificationCallback(NotificationListener.NotificationCallback callback);
|
||||
[DllImport(DllPath)] public static extern void UnregisterNotificationCallback(IntPtr notificationListener);
|
||||
|
|
Loading…
Add table
Reference in a new issue