mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-09-01 10:52:50 +02:00
Update to ananke v01r01 release.
This version fixes a problem where ananke would leave out the 'information' section (that is, the game name) when converting a game to a game folder, resulting in a folder named " (!)". It also includes the latest version of nall.
This commit is contained in:
@@ -64,5 +64,7 @@ string Ananke::syncBsxSatellaview(const string &pathname) {
|
||||
if(buffer.size() == 0) return "";
|
||||
|
||||
directory::remove(pathname);
|
||||
information.path = pathname;
|
||||
information.name = notdir(string{pathname}.rtrim<1>("/"));
|
||||
return openBsxSatellaview(buffer);
|
||||
}
|
||||
|
@@ -47,6 +47,8 @@ string Ananke::syncGameBoyAdvance(const string &pathname) {
|
||||
if(rtc.size() == 0) rtc = file::read({pathname, "rtc.rwm"});
|
||||
|
||||
directory::remove(pathname);
|
||||
information.path = pathname;
|
||||
information.name = notdir(string{pathname}.rtrim<1>("/"));
|
||||
string outputPath = openGameBoyAdvance(buffer);
|
||||
|
||||
if(save.size()) file::write({outputPath, "save.ram"}, save);
|
||||
|
@@ -49,6 +49,8 @@ string Ananke::syncGameBoy(const string &pathname) {
|
||||
if(rtc.size() == 0) rtc = file::read({pathname, "rtc.rwm"});
|
||||
|
||||
directory::remove(pathname);
|
||||
information.path = pathname;
|
||||
information.name = notdir(string{pathname}.rtrim<1>("/"));
|
||||
string outputPath = openGameBoy(buffer);
|
||||
|
||||
if(save.size()) file::write({outputPath, "save.ram"}, save);
|
||||
|
@@ -39,6 +39,7 @@
|
||||
#include <nall/stdint.hpp>
|
||||
#include <nall/stream.hpp>
|
||||
#include <nall/string.hpp>
|
||||
#include <nall/thread.hpp>
|
||||
#include <nall/traits.hpp>
|
||||
#include <nall/unzip.hpp>
|
||||
#include <nall/utility.hpp>
|
||||
|
46
ananke/nall/thread.hpp
Normal file
46
ananke/nall/thread.hpp
Normal file
@@ -0,0 +1,46 @@
|
||||
#ifndef NALL_THREAD_HPP
|
||||
#define NALL_THREAD_HPP
|
||||
|
||||
#include <nall/platform.hpp>
|
||||
#include <nall/function.hpp>
|
||||
#include <nall/intrinsics.hpp>
|
||||
|
||||
#if defined(PLATFORM_X) || defined(PLATFORM_OSX)
|
||||
#include <thread>
|
||||
#elif defined(PLATFORM_WIN)
|
||||
|
||||
//TDM/GCC 4.7 does not support std::thread
|
||||
//implement an extremely lightweight wrapper
|
||||
|
||||
namespace std {
|
||||
inline DWORD WINAPI thread_entry_point(LPVOID parameter);
|
||||
|
||||
struct thread {
|
||||
bool joinable() const {
|
||||
return active == false;
|
||||
}
|
||||
|
||||
void join() {
|
||||
while(active) usleep(1);
|
||||
}
|
||||
|
||||
thread(function<void ()> entryPoint) : entryPoint(entryPoint), active(true) {
|
||||
CreateThread(NULL, 0, thread_entry_point, (void*)this, 0, NULL);
|
||||
}
|
||||
|
||||
private:
|
||||
function<void ()> entryPoint;
|
||||
bool active;
|
||||
friend DWORD WINAPI thread_entry_point(LPVOID);
|
||||
};
|
||||
|
||||
inline DWORD WINAPI thread_entry_point(LPVOID parameter) {
|
||||
thread *context = (thread*)parameter;
|
||||
context->entryPoint();
|
||||
context->active = false;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@@ -78,6 +78,8 @@ string Ananke::syncSufamiTurbo(const string &pathname) {
|
||||
if(save.size() == 0) save = file::read({pathname, "save.rwm"});
|
||||
|
||||
directory::remove(pathname);
|
||||
information.path = pathname;
|
||||
information.name = notdir(string{pathname}.rtrim<1>("/"));
|
||||
string outputPath = openSufamiTurbo(buffer);
|
||||
|
||||
if(save.size()) file::write({outputPath, "save.ram"}, save);
|
||||
|
@@ -201,6 +201,8 @@ string Ananke::syncSuperFamicom(const string &pathname) {
|
||||
if(rtc.size() == 0) rtc= file::read({pathname, "rtc.rwm"});
|
||||
|
||||
directory::remove(pathname);
|
||||
information.path = pathname;
|
||||
information.name = notdir(string{pathname}.rtrim<1>("/"));
|
||||
string outputPath = openSuperFamicom(buffer);
|
||||
|
||||
if(save.size()) file::write({outputPath, "save.ram"}, save);
|
||||
|
Reference in New Issue
Block a user