@@ -25,7 +25,7 @@ License : Licensed under GPLv3 or any later version.
25
25
do { \
26
26
const int32_t ret = fn; \
27
27
if (ret < 0 ) { \
28
- ALOGE (" ERROR (%s ): %s () returned %d " , __FUNCTION__, #fn, ret); \
28
+ ALOGE (" ERROR ({} ): {} () returned {} " , __FUNCTION__, #fn, ret); \
29
29
return (returnCode); \
30
30
} \
31
31
} while (0 )
@@ -38,7 +38,7 @@ void OXR_CheckErrors(XrResult result, const char* function, bool failOnError) {
38
38
if (failOnError) {
39
39
FAIL (" OpenXR error: %s: %s\n " , function, errorBuffer);
40
40
} else {
41
- ALOGV (" OpenXR error: %s: %s \n " , function, errorBuffer);
41
+ ALOGV (" OpenXR error: {}: {} \n " , function, errorBuffer);
42
42
}
43
43
}
44
44
}
@@ -79,7 +79,7 @@ namespace {
79
79
OXR (xrEnumerateApiLayerProperties (numInputLayers, &numOutputLayers, layerProperties.data ()));
80
80
81
81
for (uint32_t i = 0 ; i < numOutputLayers; i++) {
82
- ALOGI (" Found layer %s " , layerProperties[i].layerName );
82
+ ALOGI (" Found layer {} " , layerProperties[i].layerName );
83
83
}
84
84
}
85
85
@@ -109,7 +109,7 @@ int XrCheckRequiredExtensions(const char* const* requiredExtensionNames,
109
109
uint32_t numOutputExtensions = 0 ;
110
110
OXR (xrEnumerateInstanceExtensionProperties (NULL , numInputExtensions, &numOutputExtensions,
111
111
NULL ));
112
- ALOGV (" xrEnumerateInstanceExtensionProperties found %u extension(s)." , numOutputExtensions);
112
+ ALOGV (" xrEnumerateInstanceExtensionProperties found {} extension(s)." , numOutputExtensions);
113
113
114
114
numInputExtensions = numOutputExtensions;
115
115
@@ -124,21 +124,21 @@ int XrCheckRequiredExtensions(const char* const* requiredExtensionNames,
124
124
extensionProperties.data ()));
125
125
#ifndef NDEBUG
126
126
for (uint32_t i = 0 ; i < numOutputExtensions; i++) {
127
- ALOGV (" Extension #%d = '%s '." , i, extensionProperties[i].extensionName );
127
+ ALOGV (" Extension #{} = '{} '." , i, extensionProperties[i].extensionName );
128
128
}
129
129
#endif
130
130
131
131
for (uint32_t i = 0 ; i < numRequiredExtensions; i++) {
132
132
bool found = false ;
133
133
for (uint32_t j = 0 ; j < numOutputExtensions; j++) {
134
134
if (!strcmp (requiredExtensionNames[i], extensionProperties[j].extensionName )) {
135
- ALOGD (" Found required extension %s " , requiredExtensionNames[i]);
135
+ ALOGD (" Found required extension {} " , requiredExtensionNames[i]);
136
136
found = true ;
137
137
break ;
138
138
}
139
139
}
140
140
if (!found) {
141
- ALOGE (" Failed to find required extension %s " , requiredExtensionNames[i]);
141
+ ALOGE (" Failed to find required extension {} " , requiredExtensionNames[i]);
142
142
return -2 ;
143
143
}
144
144
}
@@ -185,7 +185,7 @@ XrInstance XrInstanceCreate() {
185
185
XrInstance instanceLocal;
186
186
OXR (initResult = xrCreateInstance (&ici, &instanceLocal));
187
187
if (initResult != XR_SUCCESS) {
188
- ALOGE (" ERROR(%s ()): Failed to create XR instance_: %d ." , __FUNCTION__, initResult);
188
+ ALOGE (" ERROR({} ()): Failed to create XR instance_: {} ." , __FUNCTION__, initResult);
189
189
return XR_NULL_HANDLE;
190
190
}
191
191
// Log runtime instance info
@@ -194,7 +194,7 @@ XrInstance XrInstanceCreate() {
194
194
instanceInfo.type = XR_TYPE_INSTANCE_PROPERTIES;
195
195
instanceInfo.next = NULL ;
196
196
OXR (xrGetInstanceProperties (instanceLocal, &instanceInfo));
197
- ALOGV (" Runtime %s : Version : %u.%u.%u " , instanceInfo.runtimeName ,
197
+ ALOGV (" Runtime {} : Version : {}.{}.{} " , instanceInfo.runtimeName ,
198
198
XR_VERSION_MAJOR (instanceInfo.runtimeVersion ),
199
199
XR_VERSION_MINOR (instanceInfo.runtimeVersion ),
200
200
XR_VERSION_PATCH (instanceInfo.runtimeVersion ));
@@ -216,7 +216,7 @@ int32_t XrInitializeLoaderTrampoline(JavaVM* jvm, jobject activityObject) {
216
216
loaderInitializeInfoAndroid.applicationContext = activityObject;
217
217
xrInitializeLoaderKHR ((XrLoaderInitInfoBaseHeaderKHR*)&loaderInitializeInfoAndroid);
218
218
} else {
219
- ALOGE (" %s (): xrInitializeLoaderKHR is NULL" , __FUNCTION__);
219
+ ALOGE (" {} (): xrInitializeLoaderKHR is NULL" , __FUNCTION__);
220
220
return -1 ;
221
221
}
222
222
return 0 ;
@@ -241,7 +241,7 @@ XrSession XrSessionCreate(const XrInstance& localInstance, const XrSystemId& sys
241
241
XrResult initResult;
242
242
OXR (initResult = xrCreateSession (localInstance, &sessionCreateInfo, &session));
243
243
if (initResult != XR_SUCCESS) {
244
- ALOGE (" Failed to create XR session: %d ." , initResult);
244
+ ALOGE (" Failed to create XR session: {} ." , initResult);
245
245
return XR_NULL_HANDLE;
246
246
}
247
247
return session;
@@ -258,7 +258,7 @@ XrSystemId XrGetSystemId(const XrInstance& instanceLocal) {
258
258
XrResult initResult;
259
259
OXR (initResult = xrGetSystem (instanceLocal, &sgi, &systemId));
260
260
if (initResult != XR_SUCCESS) {
261
- ALOGE (" ERROR (%s ()): Failed to get system." , __FUNCTION__);
261
+ ALOGE (" ERROR ({} ()): Failed to get system." , __FUNCTION__);
262
262
return XR_NULL_SYSTEM_ID;
263
263
}
264
264
return systemId;
@@ -269,14 +269,14 @@ size_t GetMaxLayerCount(const XrInstance& instanceLocal, const XrSystemId& syste
269
269
systemProperties.type = XR_TYPE_SYSTEM_PROPERTIES;
270
270
OXR (xrGetSystemProperties (instanceLocal, systemId, &systemProperties));
271
271
272
- ALOGV (" System Properties: Name=%s VendorId=%x " , systemProperties.systemName ,
272
+ ALOGV (" System Properties: Name={} VendorId={} " , systemProperties.systemName ,
273
273
systemProperties.vendorId );
274
- ALOGV (" System Graphics Properties: MaxWidth=%d MaxHeight=%d MaxLayers=%d " ,
274
+ ALOGV (" System Graphics Properties: MaxWidth={} MaxHeight={} MaxLayers={} " ,
275
275
systemProperties.graphicsProperties .maxSwapchainImageWidth ,
276
276
systemProperties.graphicsProperties .maxSwapchainImageHeight ,
277
277
systemProperties.graphicsProperties .maxLayerCount );
278
- ALOGV (" System Tracking Properties: OrientationTracking=%s "
279
- " PositionTracking=%s " ,
278
+ ALOGV (" System Tracking Properties: OrientationTracking={} "
279
+ " PositionTracking={} " ,
280
280
systemProperties.trackingProperties .orientationTracking ? " True" : " False" ,
281
281
systemProperties.trackingProperties .positionTracking ? " True" : " False" );
282
282
@@ -310,20 +310,20 @@ int32_t OpenXr::XrViewConfigInit() {
310
310
OXR (xrEnumerateViewConfigurations (instance_, systemId_, viewportConfigTypeCount,
311
311
&viewportConfigTypeCount, viewportConfigurationTypes.data ()));
312
312
313
- ALOGV (" Available Viewport Configuration Types: %d " , viewportConfigTypeCount);
313
+ ALOGV (" Available Viewport Configuration Types: {} " , viewportConfigTypeCount);
314
314
315
315
bool foundSupportedViewport;
316
316
for (uint32_t i = 0 ; i < viewportConfigTypeCount; i++) {
317
317
const XrViewConfigurationType viewportConfigType = viewportConfigurationTypes[i];
318
318
319
- ALOGV (" Viewport configuration type %d : %s " , viewportConfigType,
319
+ ALOGV (" Viewport configuration type {} : {} " , viewportConfigType,
320
320
viewportConfigType == VIEW_CONFIG_TYPE ? " Selected" : " " );
321
321
322
322
XrViewConfigurationProperties viewportConfig;
323
323
viewportConfig.type = XR_TYPE_VIEW_CONFIGURATION_PROPERTIES;
324
324
OXR (xrGetViewConfigurationProperties (instance_, systemId_, viewportConfigType,
325
325
&viewportConfig));
326
- ALOGV (" FovMutable=%s ConfigurationType %d " , viewportConfig.fovMutable ? " true" : " false" ,
326
+ ALOGV (" FovMutable={} ConfigurationType {} " , viewportConfig.fovMutable ? " true" : " false" ,
327
327
viewportConfig.viewConfigurationType );
328
328
329
329
uint32_t viewCount;
@@ -347,12 +347,12 @@ int32_t OpenXr::XrViewConfigInit() {
347
347
const XrViewConfigurationView* element = &elements[e];
348
348
(void )element;
349
349
350
- ALOGV (" Viewport [%d ]: Recommended Width=%d Height=%d "
351
- " SampleCount=%d " ,
350
+ ALOGV (" Viewport [{} ]: Recommended Width={} Height={} "
351
+ " SampleCount={} " ,
352
352
e, element->recommendedImageRectWidth , element->recommendedImageRectHeight ,
353
353
element->recommendedSwapchainSampleCount );
354
354
355
- ALOGV (" Viewport [%d ]: Max Width=%d Height=%d SampleCount=%d " , e,
355
+ ALOGV (" Viewport [{} ]: Max Width={} Height={} SampleCount={} " , e,
356
356
element->maxImageRectWidth , element->maxImageRectHeight ,
357
357
element->maxSwapchainSampleCount );
358
358
}
@@ -366,7 +366,7 @@ int32_t OpenXr::XrViewConfigInit() {
366
366
}
367
367
}
368
368
} else {
369
- ALOGD (" Empty viewport configuration type: %d " , viewCount);
369
+ ALOGD (" Empty viewport configuration type: {} " , viewCount);
370
370
}
371
371
}
372
372
if (!foundSupportedViewport) {
@@ -490,7 +490,7 @@ int OpenXr::OpenXRInit(JavaVM* const jvm, const jobject activityObject) {
490
490
const XrVersion eglVersion = XR_MAKE_VERSION (eglMajor, eglMinor, 0 );
491
491
if (eglVersion < graphicsRequirements.minApiVersionSupported ||
492
492
eglVersion > graphicsRequirements.maxApiVersionSupported ) {
493
- ALOGE (" GLES version %d.%d not supported" , eglMajor, eglMinor);
493
+ ALOGE (" GLES version {}.{} not supported" , eglMajor, eglMinor);
494
494
return -5 ;
495
495
}
496
496
}
0 commit comments