Skip to content

Commit

Permalink
#2335: added REVERT_SCROLL option to the config
Browse files Browse the repository at this point in the history
  • Loading branch information
nesbox committed Nov 11, 2023
1 parent f265d1e commit 00a895d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build/assets/config.tic.dat

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ THEME=
CHECK_NEW_VERSION=true
SOFTWARE_RENDERING=false
UI_SCALE=4
REVERT_SCROLL=false

---------------------------
function TIC()
Expand Down
1 change: 1 addition & 0 deletions src/studio/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ static void readConfig(Config* config)
readGlobalBool(lua, "CHECK_NEW_VERSION", &config->data.checkNewVersion);
readGlobalInteger(lua, "UI_SCALE", &config->data.uiScale);
readGlobalBool(lua, "SOFTWARE_RENDERING", &config->data.soft);
readGlobalBool(lua, "REVERT_SCROLL", &config->data.revertScroll);

if(config->data.uiScale <= 0)
config->data.uiScale = 1;
Expand Down
3 changes: 3 additions & 0 deletions src/studio/studio.c
Original file line number Diff line number Diff line change
Expand Up @@ -2139,6 +2139,9 @@ static void processMouseStates(Studio* studio)

state->dbl.ticks++;
}

if(getConfig(studio)->revertScroll)
tic->ram->input.mouse.scrolly *= -1;
}

static void blitCursor(Studio* studio)
Expand Down
1 change: 1 addition & 0 deletions src/studio/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ typedef struct
bool checkNewVersion;
bool cli;
bool soft;
bool revertScroll;

struct StudioOptions
{
Expand Down

0 comments on commit 00a895d

Please sign in to comment.