> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFGameSaveFilesSetActiveDeviceChangedCallback

> Sets the active device changed callback. When this callback is triggered, it means the user moved to another device so this title should return to main menu

Sets the active device changed callback. When this callback is triggered, it means the user moved to another device so this title should return to main menu

## Syntax

```cpp theme={null}
HRESULT PFGameSaveFilesSetActiveDeviceChangedCallback(  
    XTaskQueueHandle callbackQueue,  
    PFGameSaveFilesActiveDeviceChangedCallback* callback,  
    void* context  
)  
```

### Parameters

**`callbackQueue`**   XTaskQueueHandle<br />*optional*

The async queue the callback should be invoked on.

**`callback`**   PFGameSaveFilesActiveDeviceChangedCallback\*

The callback to be invoked when the active device changes.

**`context`**   void\*<br />*optional*

The context to be passed to the callback.

### Return value

Type: HRESULT

Result code for this API operation.

## Requirements

**Header:** PFGameSaveFiles.h

## See also

[PFGameSaveFiles members](/services/playfab/api-references/c/pfgamesavefiles/pfgamesavefiles_members)
