Hook Steam screenshots and send internal capture

Using the Steamworks API, we can hook the screenshot function and listen
for a screenshot request callback to send in our own screenshot. This
applies the screenshot improvements to Steam screenshots as well.

Doing this requires adding some C wrapper functions, as our interface
with the Steam API is only conducted through C.
This commit is contained in:
Misa
2024-01-09 11:30:17 -08:00
committed by Misa Elizabeth Kai
parent f05827f268
commit ae5ef9753c
3 changed files with 122 additions and 5 deletions

View File

@@ -2,6 +2,8 @@
#include <SDL.h>
#include "Graphics.h"
#include "GraphicsUtil.h"
#include "Localization.h"
#include "UtilityClass.h"
@@ -27,4 +29,14 @@ uint32_t LOC_toupper_ch(uint32_t ch)
return loc::toupper_ch(ch);
}
SDL_Surface* GRAPHICS_tempScreenshot(void)
{
return graphics.tempScreenshot;
}
uint8_t UTIL_TakeScreenshot(SDL_Surface** surface)
{
return TakeScreenshot(surface);
}
} /* extern "C" */