mirror of
https://github.com/holub/mame
synced 2025-06-06 21:03:47 +03:00
Fix .hi file load and write
hiscore.dat and hi folder path were not resolved as expected (their path was relative to mame executable, not to the plugin folder). Explicitly writing them as absolute paths gives the desired behavior.
This commit is contained in:
parent
3c47e78419
commit
0646ca8b1a
@ -22,8 +22,8 @@ end
|
||||
|
||||
function hiscore.startplugin()
|
||||
|
||||
local hiscoredata_path = "hiscore.dat";
|
||||
local hiscore_path = "hi";
|
||||
local hiscoredata_path = hiscore_plugin_path .. "/hiscore.dat";
|
||||
local hiscore_path = hiscore_plugin_path .. "/hi";
|
||||
|
||||
local current_checksum = 0;
|
||||
local default_checksum = 0;
|
||||
@ -65,9 +65,6 @@ function hiscore.startplugin()
|
||||
local function read_hiscore_dat ()
|
||||
local file = io.open( hiscoredata_path, "r" );
|
||||
local rm_match;
|
||||
if not file then
|
||||
file = io.open( hiscore_plugin_path .. "/hiscore.dat", "r" );
|
||||
end
|
||||
if emu.softname() ~= "" then
|
||||
rm_match = '^' .. emu.romname() .. ',' .. emu.softname() .. ':';
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user