From 4be52b7b696c86935db7580728575b1e5c87fa7f Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Sat, 17 Nov 2018 12:29:59 +0100 Subject: [PATCH] missing changes... --- core/stdclass.cpp | 11 +++++++++++ core/stdclass.h | 1 + 2 files changed, 12 insertions(+) diff --git a/core/stdclass.cpp b/core/stdclass.cpp index 6f43631f3..d45fe3b46 100644 --- a/core/stdclass.cpp +++ b/core/stdclass.cpp @@ -117,6 +117,17 @@ string get_game_save_prefix() return get_writable_data_path("/data/") + save_file; } +string get_game_basename() +{ + char image_path[512]; + cfgLoadStr("config", "image", image_path, ""); + string game_dir = image_path; + size_t lastindex = game_dir.find_last_of("."); + if (lastindex != -1) + game_dir = game_dir.substr(0, lastindex); + return game_dir; +} + #if 0 //File Enumeration void FindAllFiles(FileFoundCB* callback,wchar* dir,void* param) diff --git a/core/stdclass.h b/core/stdclass.h index ee67f130c..8e015c765 100644 --- a/core/stdclass.h +++ b/core/stdclass.h @@ -272,6 +272,7 @@ string get_readonly_data_path(const string& filename); bool file_exists(const string& filename); string get_game_save_prefix(); +string get_game_basename(); class VArray2 {