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