mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-09-03 03:22:40 +02:00
Update to v093r07 release.
byuu says: Changelog: - importing a game won't show message box on success - importing a game will select the game that was imported in the list - caveat: GTK+ port doesn't seem to be removing focus from item 0 even though the selection is on item 2 - Game Boy audio reduced in volume by 50% - Game Boy Advance audio reduced in volume by 50% - Game Boy internally mixes audio at 2MHz now - Game Boy Advance's Game Boy audio hardware internally mixes audio at 2MHz now - Game Boy Color doesn't sort sprites by X-coordinate - Game Boy Color allows transparency on BGpriority pixels - caveat: this seems to allow sprites to appear on top of windows - Game Boy Color VRAM DMA transfers 16 bytes in 8 clocks (or 16 clocks in double speed mode) - Game Boy Color VRAM DMA masks low 4-bits of source and destination address - Game Boy Color VRAM DMA only allows reads from ROM or RAM - Game Boy Color VRAM DMA only allows writes to VRAM - fixed a bug in dereferencing a nullptr from pObject::find(), should fix crash when pressing enter key on blank windows - fixed Windows RadioItem selection - Game Boy Advance color emulation code added
This commit is contained in:
@@ -15,8 +15,8 @@ string activepath() {
|
||||
string realpath(const string& name) {
|
||||
string result;
|
||||
char path[PATH_MAX] = "";
|
||||
if(::realpath(name, path)) result = path;
|
||||
if(result.empty()) result = {activepath(), name};
|
||||
if(::realpath(name, path)) result = dir(path);
|
||||
if(result.empty()) result = activepath();
|
||||
result.transform("\\", "/");
|
||||
if(result.endsWith("/") == false) result.append("/");
|
||||
return result;
|
||||
@@ -25,15 +25,14 @@ string realpath(const string& name) {
|
||||
// /home/username/
|
||||
// c:/users/username/
|
||||
string userpath() {
|
||||
string result;
|
||||
#if defined(PLATFORM_WINDOWS)
|
||||
wchar_t path[PATH_MAX] = L"";
|
||||
SHGetFolderPathW(nullptr, CSIDL_PROFILE | CSIDL_FLAG_CREATE, nullptr, 0, path);
|
||||
result = (const char*)utf8_t(path);
|
||||
string result = (const char*)utf8_t(path);
|
||||
result.transform("\\", "/");
|
||||
#else
|
||||
struct passwd *userinfo = getpwuid(getuid());
|
||||
result = userinfo->pw_dir;
|
||||
struct passwd* userinfo = getpwuid(getuid());
|
||||
string result = userinfo->pw_dir;
|
||||
#endif
|
||||
if(result.empty()) result = ".";
|
||||
if(result.endsWith("/") == false) result.append("/");
|
||||
@@ -43,49 +42,55 @@ string userpath() {
|
||||
// /home/username/.config/
|
||||
// c:/users/username/appdata/roaming/
|
||||
string configpath() {
|
||||
string result;
|
||||
#if defined(PLATFORM_WINDOWS)
|
||||
wchar_t path[PATH_MAX] = L"";
|
||||
SHGetFolderPathW(nullptr, CSIDL_APPDATA | CSIDL_FLAG_CREATE, nullptr, 0, path);
|
||||
result = (const char*)utf8_t(path);
|
||||
string result = (const char*)utf8_t(path);
|
||||
result.transform("\\", "/");
|
||||
#elif defined(PLATFORM_MACOSX)
|
||||
result = {userpath(), "Library/Application Support/"};
|
||||
string result = {userpath(), "Library/Application Support/"};
|
||||
#else
|
||||
result = {userpath(), ".config/"};
|
||||
string result = {userpath(), ".config/"};
|
||||
#endif
|
||||
if(result.empty()) result = ".";
|
||||
if(result.endsWith("/") == false) result.append("/");
|
||||
return result;
|
||||
}
|
||||
|
||||
// /usr/share
|
||||
// /Library/Application Support/
|
||||
// c:/ProgramData/
|
||||
string sharedpath() {
|
||||
string result;
|
||||
#if defined(PLATFORM_WINDOWS)
|
||||
wchar_t path[PATH_MAX] = L"";
|
||||
SHGetFolderPathW(nullptr, CSIDL_COMMON_APPDATA | CSIDL_FLAG_CREATE, nullptr, 0, path);
|
||||
result = (const char*)utf8_t(path);
|
||||
string result = (const char*)utf8_t(path);
|
||||
result.transform("\\", "/");
|
||||
#elif defined(PLATFORM_MACOSX)
|
||||
result = "/Library/Application Support/";
|
||||
string result = "/Library/Application Support/";
|
||||
#else
|
||||
result = "/usr/share/";
|
||||
string result = "/usr/share/";
|
||||
#endif
|
||||
if(result.empty()) result = ".";
|
||||
if(result.endsWith("/") == false) result.append("/");
|
||||
return result;
|
||||
}
|
||||
|
||||
// /tmp
|
||||
// c:/users/username/AppData/Local/Temp/
|
||||
string temppath() {
|
||||
#if defined(PLATFORM_WINDOWS)
|
||||
wchar_t path[PATH_MAX] = L"";
|
||||
GetTempPathW(PATH_MAX, path);
|
||||
string result = (const char*)utf8_t(path);
|
||||
result.transform("\\", "/");
|
||||
return result;
|
||||
#elif defined(P_tmpdir)
|
||||
string result = P_tmpdir;
|
||||
#else
|
||||
return "/tmp/";
|
||||
string result = "/tmp/";
|
||||
#endif
|
||||
if(result.endsWith("/") == false) result.append("/");
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user