Skip to content
Snippets Groups Projects
Commit 2b0f50dd authored by Geenz's avatar Geenz
Browse files

Crash on exit fix + general code cleanup in LLWindowMacOSX.

parent ddb48d51
No related branches found
No related tags found
No related merge requests found
...@@ -283,6 +283,7 @@ void callMouseMoved(float *pos, MASK mask) ...@@ -283,6 +283,7 @@ void callMouseMoved(float *pos, MASK mask)
outCoords.mX += deltas[0]; outCoords.mX += deltas[0];
outCoords.mY += deltas[1]; outCoords.mY += deltas[1];
gWindowImplementation->getCallbacks()->handleMouseMove(gWindowImplementation, outCoords, gKeyboard->currentMask(TRUE)); gWindowImplementation->getCallbacks()->handleMouseMove(gWindowImplementation, outCoords, gKeyboard->currentMask(TRUE));
} }
void callScrollMoved(float delta) void callScrollMoved(float delta)
...@@ -339,9 +340,7 @@ void LLWindowMacOSX::updateMouseDeltas(float* deltas) ...@@ -339,9 +340,7 @@ void LLWindowMacOSX::updateMouseDeltas(float* deltas)
if (mCursorDecoupled) if (mCursorDecoupled)
{ {
mCursorLastEventDeltaX = llround(deltas[0]); mCursorLastEventDeltaX = llround(deltas[0]);
mCursorLastEventDeltaY = llround(-deltas[1]); mCursorLastEventDeltaY = llround(deltas[1]);
if (mCursorIgnoreNextDelta) if (mCursorIgnoreNextDelta)
{ {
...@@ -372,21 +371,6 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits ...@@ -372,21 +371,6 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits
{ {
LL_INFOS("Window") << "Creating window..." << LL_ENDL; LL_INFOS("Window") << "Creating window..." << LL_ENDL;
mWindow = getMainAppWindow(); mWindow = getMainAppWindow();
/*
LL_INFOS("Window") << "Registering key callbacks..." << LL_ENDL;
registerKeyDownCallback(mWindow, callKeyDown);
registerKeyUpCallback(mWindow, callKeyUp);
registerUnicodeCallback(mWindow, callUnicodeCallback);
registerMouseDownCallback(mWindow, callLeftMouseDown);
registerMouseUpCallback(mWindow, callLeftMouseUp);
registerRightMouseDownCallback(mWindow, callRightMouseDown);
registerRightMouseUpCallback(mWindow, callRightMouseUp);
registerDoubleClickCallback(mWindow, callDoubleClick);
registerMouseMovedCallback(mWindow, callMouseMoved);
registerScrollCallback(mWindow, callScrollMoved);
registerDeltaUpdateCallback(mWindow, callDeltaUpdate);
registerMouseExitCallback(mWindow, callMouseExit);
*/
} }
if(mContext == NULL) if(mContext == NULL)
...@@ -395,7 +379,6 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits ...@@ -395,7 +379,6 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits
// Our OpenGL view is already defined within SecondLife.xib. // Our OpenGL view is already defined within SecondLife.xib.
// Get the view instead. // Get the view instead.
mGLView = createOpenGLView(mWindow); mGLView = createOpenGLView(mWindow);
//registerResizeEventCallback(mGLView, callResize);
mContext = getCGLContextObj(mGLView); mContext = getCGLContextObj(mGLView);
// Since we just created the context, it needs to be set up. // Since we just created the context, it needs to be set up.
glNeedsInit = TRUE; glNeedsInit = TRUE;
......
...@@ -51,7 +51,6 @@ ...@@ -51,7 +51,6 @@
if (appExiting) if (appExiting)
{ {
[frameTimer release]; [frameTimer release];
cleanupViewer();
[[NSApplication sharedApplication] terminate:self]; [[NSApplication sharedApplication] terminate:self];
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment