Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
graphicsframework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
Oliver Behnke
graphicsframework
Commits
4c4f66f7
Commit
4c4f66f7
authored
17 years ago
by
Oliver Bock
Browse files
Options
Downloads
Patches
Plain Diff
One more windoze recycling fix
* Reinitialize OpenGL context fullscreen toggle * Extended a few comments
parent
c52dc124
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
WindowManager.cpp
+9
-8
9 additions, 8 deletions
WindowManager.cpp
with
9 additions
and
8 deletions
WindowManager.cpp
+
9
−
8
View file @
4c4f66f7
...
...
@@ -162,7 +162,7 @@ void WindowManager::eventLoop()
if
(
i
<
500
)
{
i
++
;
#endif
// notify our observers (currently exactly one)
// notify our observers (currently exactly one
, hence front()
)
eventObservers
.
front
()
->
render
(
dtime
());
#ifdef DEBUG_VALGRIND
}
...
...
@@ -175,21 +175,21 @@ void WindowManager::eventLoop()
else
if
(
event
.
type
==
SDL_USEREVENT
&&
event
.
user
.
code
==
BOINCUpdateEvent
)
{
// notify observers (currently exactly one) to fetch a BOINC update
// notify observers (currently exactly one
, hence front()
) to fetch a BOINC update
eventObservers
.
front
()
->
refreshBOINCInformation
();
}
else
if
(
event
.
motion
.
state
&
(
SDL_BUTTON
(
1
)
|
SDL_BUTTON
(
3
))
&&
event
.
type
==
SDL_MOUSEMOTION
)
{
if
(
event
.
motion
.
state
&
SDL_BUTTON
(
1
))
{
// notify our observers (currently exactly one)
// notify our observers (currently exactly one
, hence front()
)
eventObservers
.
front
()
->
mouseMoveEvent
(
event
.
motion
.
xrel
,
event
.
motion
.
yrel
,
AbstractGraphicsEngine
::
MouseButtonLeft
);
}
else
if
(
event
.
motion
.
state
&
SDL_BUTTON
(
3
))
{
// notify our observers (currently exactly one)
// notify our observers (currently exactly one
, hence front()
)
eventObservers
.
front
()
->
mouseMoveEvent
(
event
.
motion
.
xrel
,
event
.
motion
.
yrel
,
...
...
@@ -207,7 +207,7 @@ void WindowManager::eventLoop()
m_DesktopBitsPerPixel
,
m_VideoModeFlags
);
// notify our observers (currently exactly one)
// notify our observers (currently exactly one
, hence front()
)
// (windoze needs to be reinitialized instead of just resized, oh well)
eventObservers
.
front
()
->
initialize
(
m_CurrentWidth
,
m_CurrentHeight
,
0
,
true
);
}
...
...
@@ -221,7 +221,7 @@ void WindowManager::eventLoop()
}
else
if
(
event
.
type
==
SDL_KEYDOWN
)
{
switch
(
event
.
key
.
keysym
.
sym
)
{
// notify our observers (currently exactly one)
// notify our observers (currently exactly one
, hence front()
)
case
SDLK_s
:
eventObservers
.
front
()
->
keyboardPressEvent
(
AbstractGraphicsEngine
::
KeyS
);
break
;
...
...
@@ -369,6 +369,7 @@ void WindowManager::toggleFullscreen()
m_DesktopBitsPerPixel
,
m_VideoModeFlags
);
// notify our observers (currently exactly one)
eventObservers
.
front
()
->
resize
(
m_CurrentWidth
,
m_CurrentHeight
);
// notify our observers (currently exactly one, hence front())
// (windoze needs to be reinitialized instead of just resized, oh well)
eventObservers
.
front
()
->
initialize
(
m_CurrentWidth
,
m_CurrentHeight
,
0
,
true
);
}
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