Просмотр исходного кода

Add testnotificaiton to SDLTest.xcodeproj

Frank Praznik 2 месяцев назад
Родитель
Сommit
d1b08ac7b6

+ 75 - 0
Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj

@@ -86,6 +86,8 @@
 		00794E6609D20865003FC8A1 /* sample.wav in CopyFiles */ = {isa = PBXBuildFile; fileRef = 00794E6209D20839003FC8A1 /* sample.wav */; };
 		00794EF009D23739003FC8A1 /* utf8.txt in CopyFiles */ = {isa = PBXBuildFile; fileRef = 00794E6309D20839003FC8A1 /* utf8.txt */; };
 		00794EF709D237DE003FC8A1 /* moose.dat in CopyFiles */ = {isa = PBXBuildFile; fileRef = 00794E5E09D20839003FC8A1 /* moose.dat */; };
+		303856A72F87F7650040E40E /* testnotification.c in Sources */ = {isa = PBXBuildFile; fileRef = 303856A62F87F7650040E40E /* testnotification.c */; };
+		303856A82F87F9970040E40E /* SDL3.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 003FA643093FFD41000C53B3 /* SDL3.framework */; };
 		453774A5120915E3002F0F45 /* testshape.c in Sources */ = {isa = PBXBuildFile; fileRef = 453774A4120915E3002F0F45 /* testshape.c */; };
 		A1A8594E2BC72FC20045DD6C /* testautomation_properties.c in Sources */ = {isa = PBXBuildFile; fileRef = A1A859482BC72FC20045DD6C /* testautomation_properties.c */; };
 		A1A859502BC72FC20045DD6C /* testautomation_subsystems.c in Sources */ = {isa = PBXBuildFile; fileRef = A1A859492BC72FC20045DD6C /* testautomation_subsystems.c */; };
@@ -1267,6 +1269,8 @@
 		092D6D58FFB311A97F000001 /* testthread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testthread.c; sourceTree = "<group>"; };
 		092D6D6CFFB313437F000001 /* testkeys.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testkeys.c; sourceTree = "<group>"; };
 		092D6D75FFB313BB7F000001 /* testlock.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testlock.c; sourceTree = "<group>"; };
+		303856932F87F68F0040E40E /* testnotification.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testnotification.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		303856A62F87F7650040E40E /* testnotification.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testnotification.c; sourceTree = "<group>"; };
 		4537749212091504002F0F45 /* testshape.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testshape.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		453774A4120915E3002F0F45 /* testshape.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testshape.c; sourceTree = "<group>"; };
 		66E88E8A203B778F0004D44E /* testyuv_cvt.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testyuv_cvt.c; sourceTree = "<group>"; };
@@ -1512,6 +1516,14 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		303856902F87F68F0040E40E /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				303856A82F87F9970040E40E /* SDL3.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 		4537749012091504002F0F45 /* Frameworks */ = {
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
@@ -1795,6 +1807,7 @@
 		08FB7795FE84155DC02AAC07 /* Source */ = {
 			isa = PBXGroup;
 			children = (
+				303856A62F87F7650040E40E /* testnotification.c */,
 				092D6D10FFB30A2C7F000001 /* checkkeys.c */,
 				F399C6492A78929400C86979 /* gamepadutils.c */,
 				083E4872006D84C97F000001 /* loopwave.c */,
@@ -1935,6 +1948,7 @@
 				F36C34272C0F85DB00991150 /* testcamera.app */,
 				F3B7FD6A2D73FC630086D1D0 /* testpen.app */,
 				F3DB65E92E9DA90000568044 /* testyuv.app */,
+				303856932F87F68F0040E40E /* testnotification.app */,
 			);
 			name = Products;
 			sourceTree = "<group>";
@@ -2272,6 +2286,22 @@
 			productReference = 002F346A09CA204F00EBEB88 /* testplatform.app */;
 			productType = "com.apple.product-type.application";
 		};
+		303856922F87F68F0040E40E /* testnotification */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 303856A32F87F6920040E40E /* Build configuration list for PBXNativeTarget "testnotification" */;
+			buildPhases = (
+				3038568F2F87F68F0040E40E /* Sources */,
+				303856902F87F68F0040E40E /* Frameworks */,
+				303856912F87F68F0040E40E /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = testnotification;
+			productReference = 303856932F87F68F0040E40E /* testnotification.app */;
+			productType = "com.apple.product-type.application";
+		};
 		4537749112091504002F0F45 /* testshape */ = {
 			isa = PBXNativeTarget;
 			buildConfigurationList = 4537749A1209150C002F0F45 /* Build configuration list for PBXNativeTarget "testshape" */;
@@ -2991,6 +3021,7 @@
 				0017992010743FB700F5D044 /* testwm */,
 				F3DB65DC2E9DA90000568044 /* testyuv */,
 				BEC567EA0761D90600A33029 /* torturethread */,
+				303856922F87F68F0040E40E /* testnotification */,
 			);
 		};
 /* End PBXProject section */
@@ -3006,6 +3037,13 @@
 /* End PBXReferenceProxy section */
 
 /* Begin PBXResourcesBuildPhase section */
+		303856912F87F68F0040E40E /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 		F3C17D3828E424B100E1A26D /* Resources */ = {
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
@@ -3193,6 +3231,14 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		3038568F2F87F68F0040E40E /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				303856A72F87F7650040E40E /* testnotification.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 		4537748F12091504002F0F45 /* Sources */ = {
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
@@ -4351,6 +4397,26 @@
 			};
 			name = Release;
 		};
+		303856A42F87F6920040E40E /* Debug */ = {
+            isa = XCBuildConfiguration;
+            buildSettings = {
+                CODE_SIGN_IDENTITY = "Apple Development";
+                CODE_SIGN_STYLE = Automatic;
+                PRODUCT_NAME = testnotification;
+                PROVISIONING_PROFILE_SPECIFIER = "";
+            };
+			name = Debug;
+		};
+		303856A52F87F6920040E40E /* Release */ = {
+			isa = XCBuildConfiguration;
+            buildSettings = {
+                CODE_SIGN_IDENTITY = "Apple Development";
+                CODE_SIGN_STYLE = Automatic;
+                PRODUCT_NAME = testnotification;
+                PROVISIONING_PROFILE_SPECIFIER = "";
+            };
+			name = Release;
+		};
 		4537749712091509002F0F45 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
@@ -5029,6 +5095,15 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Debug;
 		};
+		303856A32F87F6920040E40E /* Build configuration list for PBXNativeTarget "testnotification" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				303856A42F87F6920040E40E /* Debug */,
+				303856A52F87F6920040E40E /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Debug;
+		};
 		4537749A1209150C002F0F45 /* Build configuration list for PBXNativeTarget "testshape" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (

+ 3 - 0
src/notification/unix/SDL_dbusnotification.c

@@ -601,6 +601,9 @@ static const char *GetIconURI()
             SDL_strlcpy(icon_uri, "file://", len);
             SDL_strlcat(icon_uri, full_path, len);
         }
+    } else {
+        // If the path can't be retrieved, assume it is the system name of an icon.
+        icon_uri = SDL_strdup(icon);
     }
 
     return icon_uri;