Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
cannonball
Commits
605a39aa
Commit
605a39aa
authored
Sep 14, 2013
by
reassembler
Browse files
Controls to adjust horizon
parent
8759fb71
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/engine/outrun.cpp
View file @
605a39aa
...
...
@@ -657,6 +657,15 @@ void Outrun::controls()
oinputs
.
simulate_analog
();
else
oinputs
.
analog
();
if
(
input
.
is_pressed
(
Input
::
HORIZON_DOWN
))
{
oroad
.
horizon_base
+=
-
20
;
}
else
if
(
input
.
is_pressed
(
Input
::
HORIZON_UP
))
{
oroad
.
horizon_base
+=
20
;
}
}
// -------------------------------------------------------------------------------
...
...
src/main/sdl/input.cpp
View file @
605a39aa
...
...
@@ -127,11 +127,17 @@ void Input::handle_key(const int key, const bool is_pressed)
case
SDLK_F5
:
keys
[
MENU
]
=
is_pressed
;
break
;
case
SDLK_F7
:
keys
[
HORIZON_DOWN
]
=
is_pressed
;
break
;
case
SDLK_F8
:
keys
[
HORIZON_UP
]
=
is_pressed
;
break
;
}
}
#include <iostream>
void
Input
::
handle_joy_axis
(
SDL_JoyAxisEvent
*
evt
)
{
int16_t
value
=
evt
->
value
;
...
...
src/main/sdl/input.hpp
View file @
605a39aa
...
...
@@ -32,10 +32,13 @@ public:
STEP
=
10
,
TIMER
=
11
,
MENU
=
12
,
HORIZON_DOWN
=
13
,
HORIZON_UP
=
14
};
bool
keys
[
1
3
];
bool
keys_old
[
1
3
];
bool
keys
[
1
5
];
bool
keys_old
[
1
5
];
// Has gamepad been found?
bool
gamepad
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment