aboutsummaryrefslogtreecommitdiff
path: root/range.c
diff options
context:
space:
mode:
Diffstat (limited to 'range.c')
-rw-r--r--range.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/range.c b/range.c
index c360b75..0887f9a 100644
--- a/range.c
+++ b/range.c
@@ -1324,10 +1324,8 @@ static char *interpret_move(const game_state *state, game_ui *ui,
*/
{
static int swap_buttons = -1;
- if (swap_buttons < 0) {
- char *env = getenv("RANGE_SWAP_BUTTONS");
- swap_buttons = (env && (env[0] == 'y' || env[0] == 'Y'));
- }
+ if (swap_buttons < 0)
+ swap_buttons = getenv_bool("RANGE_SWAP_BUTTONS", false);
if (swap_buttons) {
if (button == LEFT_BUTTON)
button = RIGHT_BUTTON;