Update to v094r01 release.

byuu says:

Changelog:
- port: various compilation fixes for OS X [kode54]
- nall: added programpath() function to return path to process binary
  [todo: need to have ethos use this function]
- ruby: XAudio2 will select default game sound device instead of first
  sound device
- ruby: DirectInput device IDs are no longer ambiguous when VID+PID are
  identical
- ruby: OpenGL won't try and terminate if it hasn't been initialized
- gb: D-pad up+down/left+right not masked in SGB mode
- sfc: rewrote ICD2 video rendering to output in real-time, work with
  cycle-based Game Boy renderer
- sfc: rewrote Bus::reduce(), reduces game loading time by about 500ms
- ethos: store save states in {game}/higan/* instead of {game}/bsnes/*
- loki: added target-loki/ (blank stub for now)
- Makefile: purge out/* on make clean
This commit is contained in:
Tim Allen
2014-01-28 21:04:58 +11:00
parent 10464b8c54
commit 04986d2bf7
32 changed files with 272 additions and 118 deletions

View File

@@ -201,6 +201,7 @@ template<signed precision = 0, char padchar = '0'> inline string binary(uintmax_
//platform.hpp
inline string activepath();
inline string realpath(const string& name);
inline string programpath();
inline string userpath();
inline string configpath();
inline string sharedpath();

View File

@@ -22,6 +22,20 @@ string realpath(const string& name) {
return result;
}
string programpath() {
#if defined(PLATFORM_WINDOWS)
int argc = 0;
wchar_t** argv = CommandLineToArgvW(GetCommandLine(), &argc);
string argv0 = (const char*)utf8_t(argv[0]);
LocalFree(argv);
return realpath(argv0);
#else
Dl_info info;
dladdr((void*)&programpath, &info);
return realpath(info.dli_fname);
#endif
}
// /home/username/
// c:/users/username/
string userpath() {