|
@@ -30,6 +30,7 @@ static struct func_hook wgl_swap_buffers;
|
|
static struct func_hook wgl_delete_context;
|
|
static struct func_hook wgl_delete_context;
|
|
|
|
|
|
static bool darkest_dungeon_fix = false;
|
|
static bool darkest_dungeon_fix = false;
|
|
|
|
+static bool functions_initialized = false;
|
|
|
|
|
|
struct gl_data {
|
|
struct gl_data {
|
|
HDC hdc;
|
|
HDC hdc;
|
|
@@ -724,7 +725,6 @@ static void gl_shmem_capture(void)
|
|
|
|
|
|
static void gl_capture(HDC hdc)
|
|
static void gl_capture(HDC hdc)
|
|
{
|
|
{
|
|
- static bool functions_initialized = false;
|
|
|
|
static bool critical_failure = false;
|
|
static bool critical_failure = false;
|
|
|
|
|
|
if (critical_failure) {
|
|
if (critical_failure) {
|
|
@@ -828,7 +828,7 @@ static BOOL WINAPI hook_wgl_delete_context(HGLRC hrc)
|
|
{
|
|
{
|
|
BOOL ret;
|
|
BOOL ret;
|
|
|
|
|
|
- if (capture_active()) {
|
|
|
|
|
|
+ if (capture_active() && functions_initialized) {
|
|
HDC last_hdc = jimglGetCurrentDC();
|
|
HDC last_hdc = jimglGetCurrentDC();
|
|
HGLRC last_hrc = jimglGetCurrentContext();
|
|
HGLRC last_hrc = jimglGetCurrentContext();
|
|
|
|
|