bsnes-libretro/hiro/windows/settings.cpp
Tim Allen 4d7bb510f2 Update to bsnes v107.1 release.
byuu says:

Don't let the point release fool you, there are many significant changes in this
release. I will be keeping bsnes releases using a point system until the new
higan release is ready.

Changelog:

  - GUI: added high DPI support
  - GUI: fixed the state manager image preview
  - Windows: added a new waveOut driver with support for dynamic rate control
  - Windows: corrected the XAudio 2.1 dynamic rate control support [BearOso]
  - Windows: corrected the Direct3D 9.0 fullscreen exclusive window centering
  - Windows: fixed XInput controller support on Windows 10
  - SFC: added high-level emulation for the DSP1, DSP2, DSP4, ST010, and Cx4
    coprocessors
  - SFC: fixed a slight rendering glitch in the intro to Megalomania

If the coprocessor firmware is missing, bsnes will fallback on HLE where it is
supported, which is everything other than SD Gundam GX and the two Hayazashi
Nidan Morita Shougi games.

The Windows dynamic rate control works best with Direct3D in fullscreen
exclusive mode. I recommend the waveOut driver over the XAudio 2.1 driver, as it
is not possible to target a single XAudio2 version on all Windows OS releases.
The waveOut driver should work everywhere out of the box.

Note that with DRC, the synchronization source is your monitor, so you will
want to be running at 60hz (NTSC) or 50hz (PAL). If you have an adaptive sync
monitor, you should instead use the WASAPI (exclusive) or ASIO audio driver.
2019-04-09 11:16:30 +10:00

47 lines
2.0 KiB
C++

namespace hiro {
Settings::Settings() {
string path = {Path::userSettings(), "hiro/"};
auto document = BML::unserialize(file::read({path, "windows.bml"}));
document["extendedFrameBounds/popup/x"].value(efbPopup.x);
document["extendedFrameBounds/popup/y"].value(efbPopup.y);
document["extendedFrameBounds/popup/width"].value(efbPopup.width);
document["extendedFrameBounds/popup/height"].value(efbPopup.height);
document["extendedFrameBounds/fixed/x"].value(efbFixed.x);
document["extendedFrameBounds/fixed/y"].value(efbFixed.y);
document["extendedFrameBounds/fixed/width"].value(efbFixed.width);
document["extendedFrameBounds/fixed/height"].value(efbFixed.height);
document["extendedFrameBounds/resizable/x"].value(efbResizable.x);
document["extendedFrameBounds/resizable/y"].value(efbResizable.y);
document["extendedFrameBounds/resizable/width"].value(efbResizable.width);
document["extendedFrameBounds/resizable/height"].value(efbResizable.height);
}
Settings::~Settings() {
string path = {Path::userSettings(), "hiro/"};
directory::create(path, 0755);
Markup::Node document;
document("extendedFrameBounds/popup/x").setValue(efbPopup.x);
document("extendedFrameBounds/popup/y").setValue(efbPopup.y);
document("extendedFrameBounds/popup/width").setValue(efbPopup.width);
document("extendedFrameBounds/popup/height").setValue(efbPopup.height);
document("extendedFrameBounds/fixed/x").setValue(efbFixed.x);
document("extendedFrameBounds/fixed/y").setValue(efbFixed.y);
document("extendedFrameBounds/fixed/width").setValue(efbFixed.width);
document("extendedFrameBounds/fixed/height").setValue(efbFixed.height);
document("extendedFrameBounds/resizable/x").setValue(efbResizable.x);
document("extendedFrameBounds/resizable/y").setValue(efbResizable.y);
document("extendedFrameBounds/resizable/width").setValue(efbResizable.width);
document("extendedFrameBounds/resizable/height").setValue(efbResizable.height);
file::write({path, "windows.bml"}, BML::serialize(document));
}
}