Adds macmouse config option, this enables SDL2's Ctrl+Click emulation of right-clicking on OS X. NOTE: enabling this option will affect game hotkeys (e.g. garrisoning), so they should be reassigned to something like Super in that case
This was SVN commit r16380.
This commit is contained in:
parent
1ac24adde2
commit
7ce48dda69
@ -53,6 +53,9 @@ bpp = 0
|
||||
; Preferred display (for multidisplay setups, only works with SDL 2.0)
|
||||
display = 0
|
||||
|
||||
; Emulate right-click with Ctrl+Click on Mac mice
|
||||
macmouse = false
|
||||
|
||||
; System settings:
|
||||
|
||||
; if false, actors won't be rendered but anything entity will be.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2014 Wildfire Games.
|
||||
/* Copyright (C) 2015 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -664,6 +664,14 @@ static void InitSDL()
|
||||
#if !SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
SDL_EnableUNICODE(1);
|
||||
#endif
|
||||
|
||||
#if OS_MACOSX && SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
// Some Mac mice only have one button, so they can't right-click
|
||||
// but SDL2 can emulate that with Ctrl+Click
|
||||
bool macMouse = false;
|
||||
CFG_GET_VAL("macmouse", macMouse);
|
||||
SDL_SetHint(SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK, macMouse ? "1" : "0");
|
||||
#endif
|
||||
}
|
||||
|
||||
static void ShutdownSDL()
|
||||
|
Loading…
Reference in New Issue
Block a user