Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SteelT
SRB2
Commits
b7e8d7d0
Commit
b7e8d7d0
authored
10 years ago
by
Ronald Kinard
Browse files
Options
Downloads
Patches
Plain Diff
Fix -nomouse
parent
a721528c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sdl/i_video.c
+23
-20
23 additions, 20 deletions
src/sdl/i_video.c
with
23 additions
and
20 deletions
src/sdl/i_video.c
+
23
−
20
View file @
b7e8d7d0
...
@@ -818,6 +818,8 @@ static void Impl_HandleMouseMotionEvent(SDL_MouseMotionEvent evt)
...
@@ -818,6 +818,8 @@ static void Impl_HandleMouseMotionEvent(SDL_MouseMotionEvent evt)
event_t
event
;
event_t
event
;
int
wwidth
,
wheight
;
int
wwidth
,
wheight
;
if
(
USE_MOUSEINPUT
)
{
SDL_GetWindowSize
(
window
,
&
wwidth
,
&
wheight
);
SDL_GetWindowSize
(
window
,
&
wwidth
,
&
wheight
);
if
((
SDL_GetMouseFocus
()
!=
window
&&
SDL_GetKeyboardFocus
()
!=
window
))
if
((
SDL_GetMouseFocus
()
!=
window
&&
SDL_GetKeyboardFocus
()
!=
window
))
...
@@ -832,8 +834,8 @@ static void Impl_HandleMouseMotionEvent(SDL_MouseMotionEvent evt)
...
@@ -832,8 +834,8 @@ static void Impl_HandleMouseMotionEvent(SDL_MouseMotionEvent evt)
}
}
else
else
{
{
event
.
data2
=
(
evt
.
xrel
)
*
(
wwidth
/
realwidth
);
event
.
data2
=
(
int
)
round
(
(
evt
.
xrel
)
*
(
(
float
)
wwidth
/
(
float
)
realwidth
)
)
;
event
.
data3
=
-
evt
.
yrel
*
(
wheight
/
realheight
);
event
.
data3
=
(
int
)
round
(
-
evt
.
yrel
*
(
(
float
)
wheight
/
(
float
)
realheight
)
)
;
}
}
event
.
type
=
ev_mouse
;
event
.
type
=
ev_mouse
;
...
@@ -844,6 +846,7 @@ static void Impl_HandleMouseMotionEvent(SDL_MouseMotionEvent evt)
...
@@ -844,6 +846,7 @@ static void Impl_HandleMouseMotionEvent(SDL_MouseMotionEvent evt)
HalfWarpMouse
(
wwidth
,
wheight
);
HalfWarpMouse
(
wwidth
,
wheight
);
}
}
}
}
}
static
void
Impl_HandleMouseButtonEvent
(
SDL_MouseButtonEvent
evt
,
Uint32
type
)
static
void
Impl_HandleMouseButtonEvent
(
SDL_MouseButtonEvent
evt
,
Uint32
type
)
{
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment