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
Craft
Commits
e0b7e2b7
Commit
e0b7e2b7
authored
Jul 06, 2017
by
Libretro-Admin
Browse files
This works as expected instead
parent
374219dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main.c
View file @
e0b7e2b7
...
...
@@ -155,6 +155,16 @@ typedef struct {
#define signbit(x) (_copysign(1.0, x) < 0)
#endif
static
INLINE
float
fminf_internal
(
float
a
,
float
b
)
{
return
a
<
b
?
a
:
b
;
}
static
INLINE
float
fmaxf_internal
(
float
a
,
float
b
)
{
return
a
>
b
?
a
:
b
;
}
static
double
round_internal
(
double
x
)
{
double
t
;
...
...
@@ -2975,8 +2985,8 @@ static void handle_mouse_input(void)
if
(
s
->
rx
>=
RADIANS
(
360
))
s
->
rx
-=
RADIANS
(
360
);
s
->
ry
=
fmaxf
(
s
->
ry
,
-
RADIANS
(
90
));
s
->
ry
=
fminf
(
s
->
ry
,
RADIANS
(
90
));
s
->
ry
=
fmaxf
_internal
(
s
->
ry
,
-
RADIANS
(
90
));
s
->
ry
=
fminf
_internal
(
s
->
ry
,
RADIANS
(
90
));
}
mr
=
input_state_cb
(
0
,
RETRO_DEVICE_MOUSE
,
0
,
RETRO_DEVICE_ID_MOUSE_RIGHT
);
...
...
@@ -3079,8 +3089,8 @@ void handle_movement(double dt)
s
->
rx
-=
RADIANS
(
360
);
// Keep y-rotation between [-90, 90] degrees
s
->
ry
=
fminf
(
s
->
ry
,
RADIANS
(
90
));
s
->
ry
=
fmaxf
(
s
->
ry
,
-
RADIANS
(
90
));
s
->
ry
=
fminf
_internal
(
s
->
ry
,
RADIANS
(
90
));
s
->
ry
=
fmaxf
_internal
(
s
->
ry
,
-
RADIANS
(
90
));
}
{
...
...
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