Skip to content

Commit

Permalink
Update Preset Menu callback
Browse files Browse the repository at this point in the history
  • Loading branch information
dashodanger committed Jun 10, 2024
1 parent 0e8fe17 commit 35fb5bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,13 @@ static void main_win_apply_addon_CB(Fl_Widget *w, void *data)

static void main_win_preset_CB(Fl_Widget *w, void *data)
{
std::string *preset = (std::string *)data;
std::string preset = PHYSFS_getRealDir(PathAppend("presets", *(std::string *)data).c_str());

// adapted from our Config Manager Load/Use callbacks
FILE *fp = FileOpen(preset->c_str(), "rb");
FILE *fp = FileOpen(PathAppend(preset, *(std::string *)data), "rb");
if (!fp)
{
DLG_ShowError(_("Cannot open: %s\n\n%s"), preset->c_str(), strerror(errno));
DLG_ShowError(_("Cannot open: %s\n\n%s"), preset.c_str(), strerror(errno));
return;
}
std::string text_buf;
Expand Down

0 comments on commit 35fb5bd

Please sign in to comment.