Update to v097r01 release.

byuu says:

A minor WIP to get us started.

Changelog:
- System::Video merged to PPU::Video
- System::Audio merged to DSP::Audio
- System::Configuration merged to Interface::Settings
- created emulator/emulator.cpp and accompanying object file for shared
  code between all cores

Currently, emulator.cpp just holds a videoColor() function that takes
R16G16B16, performs gamma/saturation/luma adjust, and outputs
(currently) A8R8G8B8. It's basically an internal function call for cores
to use when generating palette entries. This code used to exist inside
ui-tomoko/program/interface.cpp, but we have to move it internal for
software display emulation. But in the future, we could add other useful
cross-core functionality here.
This commit is contained in:
Tim Allen
2016-01-23 18:29:34 +11:00
parent 1fdd0582fc
commit f1ebef2ea8
32 changed files with 320 additions and 306 deletions

View File

@@ -6,7 +6,7 @@ auto activepath() -> string {
char path[PATH_MAX] = "";
auto unused = getcwd(path, PATH_MAX);
string result = path;
if(result.empty()) result = ".";
if(!result) result = ".";
result.transform("\\", "/");
if(result.endsWith("/") == false) result.append("/");
return result;
@@ -16,7 +16,7 @@ auto realpath(rstring name) -> string {
string result;
char path[PATH_MAX] = "";
if(::realpath(name, path)) result = pathname(string{path}.transform("\\", "/"));
if(result.empty()) return activepath();
if(!result) return activepath();
result.transform("\\", "/");
if(result.endsWith("/") == false) result.append("/");
return result;
@@ -48,7 +48,7 @@ auto userpath() -> string {
struct passwd* userinfo = getpwuid(getuid());
string result = userinfo->pw_dir;
#endif
if(result.empty()) result = ".";
if(!result) result = ".";
if(result.endsWith("/") == false) result.append("/");
return result;
}
@@ -66,12 +66,12 @@ auto configpath() -> string {
#else
string result = {userpath(), ".config/"};
#endif
if(result.empty()) result = ".";
if(!result) result = ".";
if(result.endsWith("/") == false) result.append("/");
return result;
}
// /home/username/.local/
// /home/username/.local/share/
// c:/users/username/appdata/local/
auto localpath() -> string {
#if defined(PLATFORM_WINDOWS)
@@ -82,9 +82,9 @@ auto localpath() -> string {
#elif defined(PLATFORM_MACOSX)
string result = {userpath(), "Library/Application Support/"};
#else
string result = {userpath(), ".local/"};
string result = {userpath(), ".local/share/"};
#endif
if(result.empty()) result = ".";
if(!result) result = ".";
if(result.endsWith("/") == false) result.append("/");
return result;
}
@@ -103,7 +103,7 @@ auto sharedpath() -> string {
#else
string result = "/usr/share/";
#endif
if(result.empty()) result = ".";
if(!result) result = ".";
if(result.endsWith("/") == false) result.append("/");
return result;
}