From d2ac8d9c3cfae1054c0520d81b9dd4da3d3767e2 Mon Sep 17 00:00:00 2001 From: Ilari Liusvaara Date: Mon, 19 Sep 2011 18:24:39 +0300 Subject: [PATCH] Fix firmware lookup Turns out path() has to return full path, not just the directory name. --- generic/mainloop.cpp | 10 +++++++--- manual.lyx | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/generic/mainloop.cpp b/generic/mainloop.cpp index 2b6a71af..072b772f 100644 --- a/generic/mainloop.cpp +++ b/generic/mainloop.cpp @@ -122,10 +122,10 @@ namespace class firmware_path_setting : public setting { public: - firmware_path_setting() : setting("firmwarepath") { _firmwarepath = "./"; default_firmware = true; } + firmware_path_setting() : setting("firmwarepath") { _firmwarepath = "."; default_firmware = true; } void blank() throw(std::bad_alloc, std::runtime_error) { - _firmwarepath = "./"; + _firmwarepath = "."; default_firmware = true; } @@ -453,7 +453,11 @@ class my_interface : public SNES::Interface { string path(SNES::Cartridge::Slot slot, const string &hint) { - return static_cast(firmwarepath_setting).c_str(); + const char* _hint = hint; + std::string _hint2 = _hint; + std::string fwp = firmwarepath_setting; + std::string finalpath = fwp + "/" + _hint2; + return finalpath.c_str(); } void video_refresh(const uint16_t *data, bool hires, bool interlace, bool overscan) diff --git a/manual.lyx b/manual.lyx index 2024ca3a..f07a84f4 100644 --- a/manual.lyx +++ b/manual.lyx @@ -1034,7 +1034,7 @@ Set where bsnes looks for firmware files. \begin_inset Quotes eld \end_inset -./ +. \begin_inset Quotes erd \end_inset