Skip to content

Commit

Permalink
#1950: better fix for the devmode
Browse files Browse the repository at this point in the history
  • Loading branch information
nesbox committed May 11, 2024
1 parent 639a341 commit fe9c919
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/studio/studio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1748,8 +1748,15 @@ static bool enterWasPressedOnce(Studio* studio)
static bool isDevMode(Studio* studio)
{
tic_mem* tic = studio->tic;
return strcmp(tic_tool_metatag(tic->cart.code.data, "devmode", tic_get_script(tic)->singleComment), "on") == 0
|| getConfig(studio)->options.devmode;
const char *devmode = tic_tool_metatag(tic->cart.code.data, "devmode", tic_get_script(tic)->singleComment);

if(strcmp(devmode, "on") == 0)
return true;

else if(strcmp(devmode, "off") == 0)
return false;

return getConfig(studio)->options.devmode;
}

static void processShortcuts(Studio* studio)
Expand Down

0 comments on commit fe9c919

Please sign in to comment.