fix: init lists, scope reduit i rename vorbis_error
This commit is contained in:
@@ -45,21 +45,24 @@
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
|
||||
// Constructor
|
||||
Director::Director() {
|
||||
std::cout << "Game start" << '\n';
|
||||
|
||||
namespace {
|
||||
auto getExecutablePath() -> std::string {
|
||||
#ifdef __EMSCRIPTEN__
|
||||
// En Emscripten els assets estan al root del filesystem virtual (/data, /config)
|
||||
executable_path_ = "";
|
||||
// En Emscripten els assets estan al root del filesystem virtual (/data, /config)
|
||||
return "";
|
||||
#else
|
||||
// Obtiene la ruta del ejecutable
|
||||
std::string base = SDL_GetBasePath();
|
||||
if (!base.empty() && base.back() == '/') {
|
||||
base.pop_back();
|
||||
}
|
||||
executable_path_ = base;
|
||||
std::string base = SDL_GetBasePath();
|
||||
if (!base.empty() && base.back() == '/') {
|
||||
base.pop_back();
|
||||
}
|
||||
return base;
|
||||
#endif
|
||||
}
|
||||
} // namespace
|
||||
|
||||
// Constructor
|
||||
Director::Director() : executable_path_(getExecutablePath()) {
|
||||
std::cout << "Game start" << '\n';
|
||||
|
||||
// Crea la carpeta del sistema donde guardar datos
|
||||
createSystemFolder("jailgames");
|
||||
|
||||
Reference in New Issue
Block a user