MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ddio_MouseReset

Function ddio_MouseReset

ddio/lnxmouse.cpp:155–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155void ddio_MouseReset() {
156 ddio_MouseSetLimits(0, 0, Lnx_app_obj->m_W, Lnx_app_obj->m_H);
157 DDIO_mouse_state.btn_mask = 0;
158
159 // reset button states
160 ddio_MouseQueueFlush();
161
162 /*
163 if(Mouse_mode==MOUSE_STANDARD_MODE)
164 return;
165 bool use_dga = false;
166
167 if(Lnx_app_obj && Lnx_app_obj->m_Flags&APPFLAG_DGAMOUSE)
168 use_dga = true;
169
170 // warp the mouse.
171 if(!use_dga)
172 {
173 XWarpPointer(Lnx_app_obj->m_Display, None, Lnx_app_obj->m_Window,
174 0,0,0,0, Lnx_app_obj->m_W/2, Lnx_app_obj->m_H/2);
175 }
176 */
177
178 DDIO_mouse_state.x = DDIO_mouse_state.cx = Lnx_app_obj->m_W / 2;
179 DDIO_mouse_state.y = DDIO_mouse_state.cy = Lnx_app_obj->m_H / 2;
180 DDIO_mouse_state.dy = DDIO_mouse_state.dx = 0;
181}
182
183// displays the mouse pointer. Each Hide call = Show call.
184

Callers 4

ui_SetScreenModeFunction · 0.85
ddio_MouseInitFunction · 0.85
TelComShowFunction · 0.85
ShowStaticScreenFunction · 0.85

Calls 2

ddio_MouseSetLimitsFunction · 0.85
ddio_MouseQueueFlushFunction · 0.85

Tested by

no test coverage detected