[Scummvm-git-logs] scummvm master -> 0b74f984de1847e7b76e83592486fc7154f78c85

bgK bastien.bouclet at gmail.com
Sun Nov 3 19:18:07 CET 2019


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
2d11974c28 3DS: Use DATA_PATH to configure support files location
036d61cbd6 3DS: Implement cloud sync support
0b74f984de PS3: Implement the cloud synchronization features


Commit: 2d11974c28b50c5c0a65be71caa4c93be24ab468
    https://github.com/scummvm/scummvm/commit/2d11974c28b50c5c0a65be71caa4c93be24ab468
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2019-11-03T19:14:15+01:00

Commit Message:
3DS: Use DATA_PATH to configure support files location

Changed paths:
    backends/platform/3ds/osystem.cpp
    configure


diff --git a/backends/platform/3ds/osystem.cpp b/backends/platform/3ds/osystem.cpp
index 8f896ad..041685d 100644
--- a/backends/platform/3ds/osystem.cpp
+++ b/backends/platform/3ds/osystem.cpp
@@ -130,7 +130,7 @@ Common::String OSystem_3DS::getDefaultConfigFileName() {
 }
 
 void OSystem_3DS::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) {
-	s.add("RomFS", new Common::FSDirectory("romfs:/"), priority);
+	s.add("RomFS", new Common::FSDirectory(DATA_PATH"/"), priority);
 }
 
 uint32 OSystem_3DS::getMillis(bool skipRecord) {
diff --git a/configure b/configure
index a1cdf8a..98958fc 100755
--- a/configure
+++ b/configure
@@ -1532,6 +1532,12 @@ case $_host in
 	_host_os=3ds
 	_host_cpu=arm
 	_host_alias=arm-none-eabi
+
+	test "x$prefix" = xNONE && prefix=romfs:
+
+	datarootdir='${prefix}'
+	datadir='${datarootdir}'
+	docdir='${prefix}/doc'
 	;;
 android | android-arm | android-v7a | android-arm-v7a | ouya)
 	_host_os=android


Commit: 036d61cbd62dc7907f4eeb36764bef9f794588f4
    https://github.com/scummvm/scummvm/commit/036d61cbd62dc7907f4eeb36764bef9f794588f4
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2019-11-03T19:14:15+01:00

Commit Message:
3DS: Implement cloud sync support

Changed paths:
    backends/platform/3ds/3ds.mk
    backends/platform/3ds/README.md
    backends/platform/3ds/main.cpp
    backends/platform/3ds/osystem-graphics.cpp
    backends/platform/3ds/osystem.cpp
    backends/platform/3ds/osystem.h
    backends/platform/3ds/sprite.cpp


diff --git a/backends/platform/3ds/3ds.mk b/backends/platform/3ds/3ds.mk
index 511408f..c6aff90 100644
--- a/backends/platform/3ds/3ds.mk
+++ b/backends/platform/3ds/3ds.mk
@@ -27,7 +27,7 @@ clean_3ds:
 	$(RM) $(TARGET).cia
 	$(RM) -rf romfs
 
-romfs: $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) $(DIST_FILES_NETWORKING) $(DIST_FILES_VKEYBD)
+romfs: $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) $(DIST_FILES_NETWORKING) $(DIST_FILES_VKEYBD) $(DIST_3DS_EXTRA_FILES)
 	@rm -rf romfs
 	@mkdir -p romfs
 	@cp $(DIST_FILES_THEMES) romfs/
@@ -40,6 +40,9 @@ endif
 ifdef DIST_FILES_VKEYBD
 	@cp $(DIST_FILES_VKEYBD) romfs/
 endif
+ifdef DIST_3DS_EXTRA_FILES
+	@cp -a $(DIST_3DS_EXTRA_FILES) romfs/
+endif
 
 $(TARGET).smdh: $(APP_ICON)
 	@smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
@@ -48,7 +51,7 @@ $(TARGET).smdh: $(APP_ICON)
 $(TARGET).3dsx: $(EXECUTABLE) $(TARGET).smdh romfs
 	@3dsxtool $< $@ --smdh=$(TARGET).smdh --romfs=romfs
 	@echo built ... $(notdir $@)
-	
+
 $(TARGET).bnr: $(APP_BANNER_IMAGE) $(APP_BANNER_AUDIO)
 	@bannertool makebanner -o $@ -i $(APP_BANNER_IMAGE) -a $(APP_BANNER_AUDIO)
 	@echo built ... $(notdir $@)
diff --git a/backends/platform/3ds/README.md b/backends/platform/3ds/README.md
index 345a046..a5e24ee 100644
--- a/backends/platform/3ds/README.md
+++ b/backends/platform/3ds/README.md
@@ -202,6 +202,12 @@ Note: In more recent codebases of ScummVM, you may or may not need to set the fo
 ```$ export PKG_CONFIG_LIBDIR=$PORTLIBS/lib/pkgconfig```
 See above for $PORTLIBS.
 
+ScummVM doesn't provide the CA certificates bundle required by the cloud synchronization features.
+You need to download it from the curl website: https://curl.haxx.se/ca/cacert.pem, and instruct
+the build system to package it in the binary:
+```$ export DIST_3DS_EXTRA_FILES=/path/to/cacert.pem```
+The name of the file must be `cacert.pem`.
+
 From the root of the scummvm repository:
 ```
  $ ./configure --host=3ds
diff --git a/backends/platform/3ds/main.cpp b/backends/platform/3ds/main.cpp
index ce549b6..18df14b 100644
--- a/backends/platform/3ds/main.cpp
+++ b/backends/platform/3ds/main.cpp
@@ -22,6 +22,7 @@
 
 #include "osystem.h"
 #include <3ds.h>
+#include <malloc.h>
 
 int main(int argc, char *argv[]) {
 	// Initialize basic libctru stuff
@@ -31,6 +32,12 @@ int main(int argc, char *argv[]) {
 	osSetSpeedupEnable(true);
 // 	consoleInit(GFX_TOP, NULL);
 
+#ifdef USE_LIBCURL
+	const uint32 soc_sharedmem_size = 0x10000;
+	void *soc_sharedmem = memalign(0x1000, soc_sharedmem_size);
+	socInit((u32 *)soc_sharedmem, soc_sharedmem_size);
+#endif
+
 	g_system = new _3DS::OSystem_3DS();
 	assert(g_system);
 
@@ -51,6 +58,9 @@ int main(int argc, char *argv[]) {
 		gspLcdExit();
 	}
 
+#ifdef USE_LIBCURL
+	socExit();
+#endif
 	romfsExit();
 	cfguExit();
 	gfxExit();
diff --git a/backends/platform/3ds/osystem-graphics.cpp b/backends/platform/3ds/osystem-graphics.cpp
index 56e5e95..1a86be4 100644
--- a/backends/platform/3ds/osystem-graphics.cpp
+++ b/backends/platform/3ds/osystem-graphics.cpp
@@ -86,6 +86,7 @@ void OSystem_3DS::destroyGraphics() {
 	_gameTopTexture.free();
 	_gameBottomTexture.free();
 	_overlay.free();
+	_activityIcon.free();
 
 	shaderProgramFree(&_program);
 	DVLB_Free(_dvlb);
@@ -280,6 +281,7 @@ void OSystem_3DS::updateScreen() {
 		if (_cursorVisible && config.showCursor) {
 			_cursorTexture.transfer();
 		}
+		_activityIcon.transfer();
 	C3D_FrameEnd(0);
 
 	C3D_FrameBegin(0);
@@ -294,6 +296,11 @@ void OSystem_3DS::updateScreen() {
 				C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, _modelviewLocation, _overlay.getMatrix());
 				_overlay.render();
 			}
+			if (_activityIcon.getPixels() && config.screen == kScreenTop) {
+				_activityIcon.setPosition(400 - _activityIcon.actualWidth, 0);
+				C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, _modelviewLocation, _activityIcon.getMatrix());
+				_activityIcon.render();
+			}
 			if (_cursorVisible && config.showCursor && config.screen == kScreenTop) {
 				C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, _modelviewLocation, _cursorTexture.getMatrix());
 				_cursorTexture.render();
@@ -311,6 +318,11 @@ void OSystem_3DS::updateScreen() {
 				C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, _modelviewLocation, _overlay.getMatrix());
 				_overlay.render();
 			}
+			if (_activityIcon.getPixels()) {
+				_activityIcon.setPosition(320 - _activityIcon.actualWidth, 0);
+				C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, _modelviewLocation, _activityIcon.getMatrix());
+				_activityIcon.render();
+			}
 			if (_cursorVisible && config.showCursor) {
 				C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, _modelviewLocation, _cursorTexture.getMatrix());
 				_cursorTexture.render();
@@ -436,6 +448,22 @@ void OSystem_3DS::copyRectToOverlay(const void *buf, int pitch, int x,
 	_overlay.markDirty();
 }
 
+void OSystem_3DS::displayActivityIconOnOSD(const Graphics::Surface *icon) {
+	if (!icon) {
+		_activityIcon.free();
+	} else {
+		if (!_activityIcon.getPixels() || icon->w != _activityIcon.w || icon->h != _activityIcon.h) {
+			_activityIcon.create(icon->w, icon->h, _pfGameTexture);
+		}
+
+		Graphics::Surface *converted = icon->convertTo(_pfGameTexture);
+		_activityIcon.copyRectToSurface(*converted, 0, 0, Common::Rect(converted->w, converted->h));
+		_activityIcon.markDirty();
+		converted->free();
+		delete converted;
+	}
+}
+
 int16 OSystem_3DS::getOverlayHeight() {
 	return 240;
 }
diff --git a/backends/platform/3ds/osystem.cpp b/backends/platform/3ds/osystem.cpp
index 041685d..e1186e4 100644
--- a/backends/platform/3ds/osystem.cpp
+++ b/backends/platform/3ds/osystem.cpp
@@ -193,7 +193,7 @@ void OSystem_3DS::fatalError() {
 }
 
 void OSystem_3DS::logMessage(LogMessageType::Type type, const char *message) {
-	printf("3DS log: %s\n", message);
+	printf("%s", message);
 }
 
 } // namespace _3DS
diff --git a/backends/platform/3ds/osystem.h b/backends/platform/3ds/osystem.h
index 28d21c3..89271e1 100644
--- a/backends/platform/3ds/osystem.h
+++ b/backends/platform/3ds/osystem.h
@@ -126,6 +126,7 @@ public:
 	virtual int16 getOverlayHeight();
 	virtual int16 getOverlayWidth();
 	virtual void displayMessageOnOSD(const char *msg);
+	void displayActivityIconOnOSD(const Graphics::Surface *icon) override;
 
 	bool showMouse(bool visible);
 	void warpMouse(int x, int y);
@@ -176,6 +177,7 @@ private:
 	Sprite _gameTopTexture;
 	Sprite _gameBottomTexture;
 	Sprite _overlay;
+	Sprite _activityIcon;
 
 	int _screenShakeOffset;
 	bool _overlayVisible;
diff --git a/backends/platform/3ds/sprite.cpp b/backends/platform/3ds/sprite.cpp
index b2785e2..1f2c72e 100644
--- a/backends/platform/3ds/sprite.cpp
+++ b/backends/platform/3ds/sprite.cpp
@@ -101,7 +101,7 @@ void Sprite::convertToInPlace(const Graphics::PixelFormat &dstFormat, const byte
 }
 
 void Sprite::transfer() {
-	if (dirtyPixels) {
+	if (pixels && dirtyPixels) {
 		dirtyPixels = false;
 		GSPGPU_FlushDataCache(pixels, w * h * format.bytesPerPixel);
 		C3D_SyncDisplayTransfer((u32*)pixels, GX_BUFFER_DIM(w, h), (u32*)texture.data, GX_BUFFER_DIM(w, h), TEXTURE_TRANSFER_FLAGS);
@@ -123,15 +123,19 @@ void Sprite::clear(uint32 color) {
 }
 
 void Sprite::setScale (float x, float y) {
-	scaleX = x;
-	scaleY = y;
-	dirtyMatrix = true;
+	if (x != scaleX || y != scaleY) {
+		scaleX = x;
+		scaleY = y;
+		dirtyMatrix = true;
+	}
 }
 
 void Sprite::setPosition(int x, int y) {
-	posX = x;
-	posY = y;
-	dirtyMatrix = true;
+	if (x != posX || y != posY) {
+		posX = x;
+		posY = y;
+		dirtyMatrix = true;
+	}
 }
 
 C3D_Mtx* Sprite::getMatrix() {


Commit: 0b74f984de1847e7b76e83592486fc7154f78c85
    https://github.com/scummvm/scummvm/commit/0b74f984de1847e7b76e83592486fc7154f78c85
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2019-11-03T19:14:15+01:00

Commit Message:
PS3: Implement the cloud synchronization features

Changed paths:
    backends/platform/sdl/ps3/ps3-main.cpp
    backends/platform/sdl/ps3/ps3.mk
    dists/ps3/readme-ps3.md


diff --git a/backends/platform/sdl/ps3/ps3-main.cpp b/backends/platform/sdl/ps3/ps3-main.cpp
index 2777497..23dc7402 100644
--- a/backends/platform/sdl/ps3/ps3-main.cpp
+++ b/backends/platform/sdl/ps3/ps3-main.cpp
@@ -20,14 +20,21 @@
  *
  */
 
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
 #include "common/scummsys.h"
 
 #include "backends/platform/sdl/ps3/ps3.h"
 #include "backends/plugins/sdl/sdl-provider.h"
 #include "base/main.h"
 
+#include <net/net.h>
+
 int main(int argc, char *argv[]) {
 
+#ifdef USE_LIBCURL
+	netInitialize();
+#endif
+
 	// Create our OSystem instance
 	g_system = new OSystem_PS3();
 	assert(g_system);
@@ -45,5 +52,9 @@ int main(int argc, char *argv[]) {
 	// Free OSystem
 	g_system->destroy();
 
+#ifdef USE_LIBCURL
+	netDeinitialize();
+#endif
+
 	return res;
 }
diff --git a/backends/platform/sdl/ps3/ps3.mk b/backends/platform/sdl/ps3/ps3.mk
index d660281..94885d2 100644
--- a/backends/platform/sdl/ps3/ps3.mk
+++ b/backends/platform/sdl/ps3/ps3.mk
@@ -15,6 +15,9 @@ endif
 ifdef DIST_FILES_VKEYBD
 	cp $(DIST_FILES_VKEYBD) ps3pkg/USRDIR/data/
 endif
+ifdef DIST_PS3_EXTRA_FILES
+	@cp -a $(DIST_PS3_EXTRA_FILES) ps3pkg/USRDIR/data/
+endif
 	cp $(DIST_FILES_DOCS) ps3pkg/USRDIR/doc/
 	cp $(srcdir)/dists/ps3/readme-ps3.md ps3pkg/USRDIR/doc/
 	cp $(srcdir)/dists/ps3/ICON0.PNG ps3pkg/
diff --git a/dists/ps3/readme-ps3.md b/dists/ps3/readme-ps3.md
index 698c925..e4d39df 100644
--- a/dists/ps3/readme-ps3.md
+++ b/dists/ps3/readme-ps3.md
@@ -51,6 +51,10 @@ The dependencies needed to build it are :
 - SDL from https://bitbucket.org/bgK/sdl_psl1ght
 - ScummVM from https://github.com/scummvm/scummvm
 
+ScummVM doesn't provide the CA certificates bundle required by the cloud synchronization features.
+It can be downloaded from the curl website: https://curl.haxx.se/ca/cacert.pem, and packaged in the binary using:
+```$ export DIST_PS3_EXTRA_FILES=/path/to/cacert.pem```
+
 Once all the dependencies are correctly setup, an installable package can be obtained from source by issuing the following command :
 
 ./configure --host=ps3 && make ps3pkg





More information about the Scummvm-git-logs mailing list