mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 03:59:36 +00:00
Add API for saving driver prefs. Save fullscreen state in D3D11 driver.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
struct IGpAudioChannel;
|
||||
struct IGpPrefsHandler;
|
||||
|
||||
struct IGpAudioDriver
|
||||
{
|
||||
@@ -12,4 +13,6 @@ public:
|
||||
virtual void SetMasterVolume(uint32_t vol, uint32_t maxVolume) = 0;
|
||||
|
||||
virtual void Shutdown() = 0;
|
||||
|
||||
virtual IGpPrefsHandler *GetPrefsHandler() const = 0;
|
||||
};
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
struct IGpDisplayDriverSurface;
|
||||
struct IGpCursor;
|
||||
struct IGpPrefsHandler;
|
||||
struct GpDisplayDriverProperties;
|
||||
|
||||
struct GpDisplayDriverSurfaceEffects
|
||||
@@ -45,6 +46,7 @@ public:
|
||||
virtual void RequestResetVirtualResolution() = 0;
|
||||
|
||||
virtual const GpDisplayDriverProperties &GetProperties() const = 0;
|
||||
virtual IGpPrefsHandler *GetPrefsHandler() const = 0;
|
||||
};
|
||||
|
||||
inline GpDisplayDriverSurfaceEffects::GpDisplayDriverSurfaceEffects()
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
struct IGpPrefsHandler;
|
||||
|
||||
struct IGpInputDriver
|
||||
{
|
||||
virtual void ProcessInput() = 0;
|
||||
virtual void Shutdown() = 0;
|
||||
|
||||
virtual IGpPrefsHandler *GetPrefsHandler() const = 0;
|
||||
};
|
||||
|
||||
11
GpCommon/IGpPrefsHandler.h
Normal file
11
GpCommon/IGpPrefsHandler.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
struct IGpPrefsHandler
|
||||
{
|
||||
typedef bool (*WritePrefsFunc_t) (void *context, const void *identifier, size_t identifierSize, const void *contents, size_t contentsSize, uint32_t version);
|
||||
|
||||
virtual void ApplyPrefs(const void *identifier, size_t identifierSize, const void *contents, size_t contentsSize, uint32_t version) = 0;
|
||||
virtual bool SavePrefs(void *context, WritePrefsFunc_t writeFunc) = 0;
|
||||
};
|
||||
Reference in New Issue
Block a user