Sunshine master
Self-hosted game stream host for Moonlight.
nvprefs::undo_data_t Class Reference

Serializable NVIDIA profile state saved before preference changes. More...

#include <src/platform/windows/nvprefs/undo_data.h>

Classes

struct  data_t
 NVIDIA profile settings captured for undo. More...
 

Public Member Functions

std::optional< data_t::opengl_swapchain_tget_opengl_swapchain () const
 Get opengl swapchain.
 
void merge (const undo_data_t &newer_data)
 Merge newer undo data with the current data set.
 
void read (const std::vector< char > &buffer)
 Read persisted data into the current object.
 
void set_opengl_swapchain (uint32_t our_value, std::optional< uint32_t > undo_value)
 Set opengl swapchain.
 
std::string write () const
 Serialize undo data to its JSON representation.
 

Detailed Description

Serializable NVIDIA profile state saved before preference changes.

Member Function Documentation

◆ get_opengl_swapchain()

std::optional< undo_data_t::data_t::opengl_swapchain_t > nvprefs::undo_data_t::get_opengl_swapchain ( ) const

Get opengl swapchain.

Returns
Stored OpenGL swapchain override and optional restore setting.

◆ merge()

void nvprefs::undo_data_t::merge ( const undo_data_t & newer_data)

Merge newer undo data with the current data set.

Parameters
newer_dataNewer data.

◆ read()

void nvprefs::undo_data_t::read ( const std::vector< char > & buffer)

Read persisted data into the current object.

Parameters
bufferSerialized byte buffer to read from or write to.

◆ set_opengl_swapchain()

void nvprefs::undo_data_t::set_opengl_swapchain ( uint32_t our_value,
std::optional< uint32_t > undo_value )

Set opengl swapchain.

Parameters
our_valueNVIDIA setting value applied by Sunshine.
undo_valuePrevious NVIDIA setting value to restore, if present.

◆ write()

std::string nvprefs::undo_data_t::write ( ) const

Serialize undo data to its JSON representation.

Returns
JSON string containing the undo data.

The documentation for this class was generated from the following files: