Commits

itsnotabigtruck  committed 0c442f0 Merge

Merging upstream changes

  • Participants
  • Parent commits edba003, 16327a3

Comments (0)

Files changed (3)

File src/modules/graphics/opengl/Graphics.cpp

 		//do we have scissor, if so, store the box
 		if (s.scissor)
 			glGetIntegerv(GL_SCISSOR_BOX, s.scissorBox);
+
+		char *cap = 0;
+		SDL_WM_GetCaption(&cap, 0);
+		s.caption = cap;
+		s.mouseVisible = (SDL_ShowCursor(SDL_QUERY) == SDL_ENABLE) ? true : false;
 		return s;
 	}
 
 			setScissor(s.scissorBox[0], s.scissorBox[1], s.scissorBox[2], s.scissorBox[3]);
 		else
 			setScissor();
+
+		setCaption(s.caption.c_str());
+		SDL_ShowCursor(s.mouseVisible ? SDL_ENABLE : SDL_DISABLE);
 	}
 
 	bool Graphics::setMode(int width, int height, bool fullscreen, bool vsync, int fsaa)

File src/modules/graphics/opengl/Graphics.h

 		bool scissor;
 		GLint scissorBox[4];
 
+		// Window info.
+		std::string caption;
+		bool mouseVisible;
+
 		// Default values.
 		DisplayState()
 		{
 			pointSize = 1.0f;
 			pointStyle = Graphics::POINT_SMOOTH;
 			scissor = false;
+			caption = "";
+			mouseVisible = true;
 		}
 
 	};

File src/modules/thread/sdl/wrap_Thread.cpp

 
 	int w_newThread(lua_State *L)
 	{
-		std::string name = luaL_checkstring(L, 1);
+		luaL_checkstring(L, 1);
+		size_t len;
+		const char *name_str = lua_tolstring(L, 1, &len);
+		std::string name(name_str, len);
 		love::Data *data;
 		if (lua_isstring(L, 2))
 			luax_convobj(L, 2, "filesystem", "newFile");