[Scummvm-git-logs] scummvm master -> 018a1dba1c3b8c36946f9de97f393dbd04bea68c

larsamannen noreply at scummvm.org
Sat Dec 28 16:15:02 UTC 2024


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

Summary:
1ab097a7a9 IOS7: Use OpenGL ES 3 context when possible
018a1dba1c IOS7: Log to console when debugger is attached


Commit: 1ab097a7a9600e1d0424b8300a1921e5c103a0ce
    https://github.com/scummvm/scummvm/commit/1ab097a7a9600e1d0424b8300a1921e5c103a0ce
Author: Lars Sundström (l.sundstrom at gmail.com)
Date: 2024-12-28T17:14:59+01:00

Commit Message:
IOS7: Use OpenGL ES 3 context when possible

The OpenGL ES version support is decided by the device hardware
processors, (PowerVR SGX graphics processors).
Most older devices support OpenGL ES 2.0 as documented here:
https://developer.apple.com/library/archive/documentation/OpenGLES/Conceptual/OpenGLESHardwarePlatformGuide_iOS/OpenGLESPlatforms/OpenGLESPlatforms.html

OpenGL ES 2.0 is the baseline profile for iOS devices while
support for OpenGL ES 3.0 was added in iOS 7 and later.

Devices supporting OpenGL ES 3.0 is listed here (plus the newer
devices than listed, Apple doesn't update the list for every new
device):
https://developer.apple.com/library/archive/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/HardwareGPUInformation/HardwareGPUInformation.html#//apple_ref/doc/uid/TP40013599-CH106-SW1

Changed paths:
    backends/platform/ios7/ios7_video.mm


diff --git a/backends/platform/ios7/ios7_video.mm b/backends/platform/ios7/ios7_video.mm
index e8fbcbbcd4d..85dd916145c 100644
--- a/backends/platform/ios7/ios7_video.mm
+++ b/backends/platform/ios7/ios7_video.mm
@@ -121,8 +121,12 @@ bool iOS7_fetchEvent(InternalEvent *event) {
 	                                 kEAGLDrawablePropertyColorFormat: kEAGLColorFormatRGBA8,
 	                                };
 
-	_mainContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
+	_mainContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3];
 
+	// Not all iDevices support OpenGLES 3, fallback to OpenGLES 2
+	if (_mainContext == nil) {
+		_mainContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
+	}
 	// In case creating the OpenGL ES context failed, we will error out here.
 	if (_mainContext == nil) {
 		printError("Could not create OpenGL ES context.");
@@ -137,8 +141,12 @@ bool iOS7_fetchEvent(InternalEvent *event) {
 	// Create OpenGL context with the sharegroup from the context
 	// connected to the Apple Core Animation layer
 	if (!_openGLContext && _mainContext) {
-		_openGLContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2 sharegroup:_mainContext.sharegroup];
+		_openGLContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3 sharegroup:_mainContext.sharegroup];
 
+		// Not all iDevices support OpenGLES 3, fallback to OpenGLES 2
+		if (_openGLContext == nil) {
+			_openGLContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2 sharegroup:_mainContext.sharegroup];
+		}
 		if (_openGLContext == nil) {
 			printError("Could not create OpenGL ES context using sharegroup");
 			abort();


Commit: 018a1dba1c3b8c36946f9de97f393dbd04bea68c
    https://github.com/scummvm/scummvm/commit/018a1dba1c3b8c36946f9de97f393dbd04bea68c
Author: Lars Sundström (l.sundstrom at gmail.com)
Date: 2024-12-28T17:14:59+01:00

Commit Message:
IOS7: Log to console when debugger is attached

When the device is attached to the debugger console in Xcode it is
more convenient to get the logs in the console than in a log file.

Changed paths:
    backends/platform/ios7/ios7_osys_main.cpp


diff --git a/backends/platform/ios7/ios7_osys_main.cpp b/backends/platform/ios7/ios7_osys_main.cpp
index 8098789395b..697ea25d345 100644
--- a/backends/platform/ios7/ios7_osys_main.cpp
+++ b/backends/platform/ios7/ios7_osys_main.cpp
@@ -457,7 +457,8 @@ void iOS7_main(int argc, char **argv) {
 	//OSystem_iOS7::migrateApp();
 
 	Common::String logFilePath = iOS7_getDocumentsDir() + "/scummvm.log";
-	FILE *logFile = fopen(logFilePath.c_str(), "a");
+	// Only log to file when not attached to debugger console
+	FILE *logFile = isatty(STDERR_FILENO) != 1 ? fopen(logFilePath.c_str(), "a") : nullptr;
 	if (logFile != nullptr) {
 		// We check for log file size; if it's too big, we rewrite it.
 		// This happens only upon app launch




More information about the Scummvm-git-logs mailing list