HasExpandedResources function
Gets the current resource state (that is, whether the app is running in Game Mode or shared mode).
Syntax
HRESULT WINAPI HasExpandedResources( _Out_ BOOL *hasExpandedResources );
Parameters
- hasExpandedResources [out]
-
True if the app is running in Game Mode; otherwise, false.
Return value
The result of the operation.
Remarks
This function should be called during each iteration of the game loop to check when the app enters and exits Game Mode so that the appropriate settings can be applied.
This is a Win32 API that's only supported in UWP desktop and Xbox apps. It also requires the expandedResources restricted capability, which you can select by opening Package.appxmanifest in Visual Studio and navigating to the Capabilities tab. Alternatively, you can edit the file's code directly:
<Package xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" IgnorableNamespaces=" rescap"> ... <Capabilities> <rescap:Capability Name="expandedResources" /> </Capabilities> ... </Package>
This capability is granted on a per-title basis; contact your account manager for more information. You can publish a UWP app with this capability to the Store if it targets desktop, but if it targets Xbox it will be rejected in certification.
The app must be in the foreground and have focus before exclusive resources are granted.
Requirements
|
Header |
|
|---|---|
|
Library |
|
|
DLL |
|