1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-22 08:41:41 +01:00
cnc-ddraw/src/indeo.c

62 lines
1.5 KiB
C
Raw Normal View History

2024-07-04 07:52:17 +02:00
#include <windows.h>
void indeo_enable()
{
HKEY hkey;
LONG status =
RegCreateKeyExA(
HKEY_CURRENT_USER,
"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Drivers32",
0,
NULL,
REG_OPTION_NON_VOLATILE,
KEY_WRITE | KEY_QUERY_VALUE,
NULL,
&hkey,
NULL);
if (status == ERROR_SUCCESS)
{
LPCTSTR iv31 = "ir32_32.dll";
2024-07-04 07:58:59 +02:00
RegSetValueExA(hkey, "vidc.iv31", 0, REG_SZ, (const BYTE*)iv31, strlen(iv31) + 1);
2024-07-04 07:52:17 +02:00
LPCTSTR iv32 = "ir32_32.dll";
2024-07-04 07:58:59 +02:00
RegSetValueExA(hkey, "vidc.iv32", 0, REG_SZ, (const BYTE*)iv32, strlen(iv32) + 1);
2024-07-04 07:52:17 +02:00
LPCTSTR iv41 = "ir41_32.ax";
2024-07-04 07:58:59 +02:00
RegSetValueExA(hkey, "vidc.iv41", 0, REG_SZ, (const BYTE*)iv41, strlen(iv41) + 1);
2024-07-04 07:52:17 +02:00
LPCTSTR iv50 = "ir50_32.dll";
2024-07-04 07:58:59 +02:00
RegSetValueExA(hkey, "vidc.iv50", 0, REG_SZ, (const BYTE*)iv50, strlen(iv50) + 1);
2024-07-04 07:52:17 +02:00
RegCloseKey(hkey);
}
}
void indeo_disable()
{
HKEY hkey;
LONG status =
RegCreateKeyExA(
HKEY_CURRENT_USER,
"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Drivers32",
0,
NULL,
REG_OPTION_NON_VOLATILE,
KEY_WRITE | KEY_QUERY_VALUE,
NULL,
&hkey,
NULL);
if (status == ERROR_SUCCESS)
{
RegDeleteValueA(hkey, "vidc.iv31");
RegDeleteValueA(hkey, "vidc.iv32");
RegDeleteValueA(hkey, "vidc.iv41");
RegDeleteValueA(hkey, "vidc.iv50");
RegCloseKey(hkey);
}
}