Parcourir la source

SDL Core updates to run latest changes on Linux

Ivan Safrin il y a 11 ans
Parent
commit
cbddbcf5b1
2 fichiers modifiés avec 13 ajouts et 5 suppressions
  1. 3 2
      Core/Contents/Include/PolySDLCore.h
  2. 10 3
      Core/Contents/Source/PolySDLCore.cpp

+ 3 - 2
Core/Contents/Include/PolySDLCore.h

@@ -49,9 +49,9 @@ namespace Polycode {
 		void enableMouse(bool newval);
 		void captureMouse(bool);
 		unsigned int getTicks();
-		bool Update();
+		bool systemUpdate();
 		void Render();
-		void setVideoMode(int xRes, int yRes, bool fullScreen, bool vSync, int aaLevel, int anisotropyLevel);
+		void setVideoMode(int xRes, int yRes, bool fullScreen, bool vSync, int aaLevel, int anisotropyLevel, bool retinaSupport = true);
 		void createThread(Threaded *target);
 		std::vector<Rectangle> getVideoModes();
 		
@@ -68,6 +68,7 @@ namespace Polycode {
 		void removeDiskItem(const String& itemPath);
 		String openFolderPicker();
 		std::vector<String> openFilePicker(std::vector<CoreFileExtension> extensions, bool allowMultiple);
+		String saveFilePicker(std::vector<CoreFileExtension> extensions);
 		void resizeTo(int xRes, int yRes);
 
 		String executeExternalCommand(String command, String args, String inDirectory="");

+ 10 - 3
Core/Contents/Source/PolySDLCore.cpp

@@ -107,7 +107,7 @@ SDLCore::SDLCore(PolycodeView *view, int _xRes, int _yRes, bool fullScreen, bool
 	renderer = new OpenGLRenderer();
 	services->setRenderer(renderer);
 
-	setVideoMode(xRes, yRes, fullScreen, vSync, aaLevel, anisotropyLevel);
+	setVideoMode(xRes, yRes, fullScreen, vSync, aaLevel, anisotropyLevel, retinaSupport);
 	SDL_WM_SetCaption(windowTitle->c_str(), windowTitle->c_str());
 	
 	SDL_EnableUNICODE(1);
@@ -133,7 +133,7 @@ SDLCore::SDLCore(PolycodeView *view, int _xRes, int _yRes, bool fullScreen, bool
 	CoreServices::getInstance()->installModule(new GLSLShaderModule());	
 }
 
-void SDLCore::setVideoMode(int xRes, int yRes, bool fullScreen, bool vSync, int aaLevel, int anisotropyLevel) {
+void SDLCore::setVideoMode(int xRes, int yRes, bool fullScreen, bool vSync, int aaLevel, int anisotropyLevel, bool retinaSupport) {
 	this->xRes = xRes;
 	this->yRes = yRes;
 	this->fullScreen = fullScreen;
@@ -313,7 +313,7 @@ void SDLCore::Render() {
 	SDL_GL_SwapBuffers();
 }
 
-bool SDLCore::Update() {
+bool SDLCore::systemUpdate() {
 	if(!running)
 		return false;
 	doSleep();	
@@ -496,6 +496,13 @@ String SDLCore::openFolderPicker() {
 
 vector<String> SDLCore::openFilePicker(vector<CoreFileExtension> extensions, bool allowMultiple) {
 	vector<String> r;
+	printf("WARNING: openFilePicker is not implemented in SDLCore!\n");
+	return r;
+}
+
+String SDLCore::saveFilePicker(std::vector<CoreFileExtension> extensions) {
+	String r;
+	printf("WARNING: saveFilePicker is not implemented in SDLCore!\n");
 	return r;
 }