Viewing Issue Advanced Details
|ID||Category [?]||Severity [?]||Reproducibility||Date Submitted||Last Update|
|06299||Interface||Feature||Always||Jul 16, 2016, 01:15||Jul 16, 2016, 13:20|
|Tester||ozfalcon||View Status||Public||Platform||MAME (Self-compiled)|
|Assigned To||Resolution||No change required||OS||Linux (32-bit)|
|Version||0.175||Fixed in Version||Build||Normal|
|Summary||06299: plugins/hiscore/init.lua: HiScore save path is based on current folder, Default should be a stable location like within the hiscore plugin folder.|
When the hiscore plugin is used, The Default location for the hi score saves is in the current folder.
The Default location should be grouped together with the hiscore plugin for consistent behaviour.
ATTACHED is a patch containing:
1. Change the Default location of "hi" folder to within the hiscore plugin path.
2. Slight improvement to the verbose output of the hiscore plugin.
Patch was built using current git hiscore plugin.
|Steps To Reproduce||
Run Mame with the hiscore plugin enabled then play a game & make a hi score.
The default "hi" score folder will be created wherever you started Mame (Current folder).
Minor improvement to the verbose output of hiscore script.
sdlmame -v galaga |grep hiscore:
|Affected Sets / Systems||plugins/hiscore/init.lua|
hiscorepath.diff (1,237 bytes) Jul 16, 2016, 01:15 Uploaded by ozfalcon
Change Default location of hi folder & improve verbose output.[Show Content] [Hide Content]
diff -Nru oldplugins/hiscore/init.lua plugins/hiscore/init.lua --- oldplugins/hiscore/init.lua 2016-07-15 11:01:03.570347000 +1000 +++ plugins/hiscore/init.lua 2016-07-15 11:07:26.501743000 +1000 @@ -23,7 +23,9 @@ function hiscore.startplugin() local hiscoredata_path = "hiscore.dat"; - local hiscore_path = "hi"; + +-- local hiscore_path = "hi"; + local hiscore_path = hiscore_plugin_path .. "/hi"; local current_checksum = 0; local default_checksum = 0; @@ -63,6 +65,7 @@ local function read_hiscore_dat () + emu.print_verbose("hiscore: hiscoredata_path = " .. hiscoredata_path ) local file = io.open( hiscoredata_path, "r" ); local rm_match; if not file then @@ -127,6 +130,7 @@ else r = hiscore_path .. '/' .. emu.romname() .. ".hi"; end + emu.print_verbose("hiscore: hiscore_path = " .. r ) return r; end @@ -246,7 +250,7 @@ mem_check_passed = false scores_have_been_read = false; last_write_time = -10 - emu.print_verbose("Starting " .. emu.gamename()) + emu.print_verbose("hiscore: Starting " .. emu.gamename()) local dat = read_hiscore_dat() if dat and dat ~= "" then emu.print_verbose( "hiscore: found hiscore.dat entry for " .. emu.romname() );
|There are no relationsihp linked to this issue.|
Jul 16, 2016, 10:18
This really isn't a bug to be reported, but a code submission/added feature. Please use GIT for a pull requests you want to send upstream and keep features and requests over there.
Posting a patch here is likely to not get much attention. Visit: http://wiki.mamedev.org/index.php/Submitting_Source_Code to review submission rules and expectations.
Jul 16, 2016, 13:20
|The problem with this is that we wanted to make it simple for most users to seamlessly keep using their existing hiscore files. Many would think that their old files are incompatible if they don't get loaded just because they need to be moved to a different directory. Also, if we do move the default directory, I'd prefer to put it in the nvram directory so they don't get deleted when users update their plugins.|