1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-23 08:52:25 +01:00
cnc-ddraw/src/config.c

1130 lines
37 KiB
C
Raw Normal View History

#include <windows.h>
#include <stdio.h>
#include <d3d9.h>
#include "fps_limiter.h"
2020-10-13 09:20:52 +02:00
#include "config.h"
#include "dd.h"
#include "render_d3d9.h"
2020-10-13 09:20:52 +02:00
#include "render_gdi.h"
#include "render_ogl.h"
#include "hook.h"
2020-10-13 09:20:52 +02:00
#include "debug.h"
#include "dllmain.h"
2021-09-16 03:11:47 +02:00
static void cfg_init();
2020-10-13 09:20:52 +02:00
static void cfg_create_ini();
2023-09-22 00:38:42 +02:00
static BOOL cfg_get_bool(LPCSTR key, BOOL default_value);
static int cfg_get_int(LPCSTR key, int default_value);
static DWORD cfg_get_string(LPCSTR key, LPCSTR default_value, LPSTR out_string, DWORD out_size);
2023-09-22 01:47:00 +02:00
#define GET_INT(a,b,c) a = cfg_get_int(b, c); TRACE("%s=%d\n", b, a)
#define GET_BOOL(a,b,c) a = cfg_get_bool(b, c); TRACE("%s=%s\n", b, a ? "true" : "false")
#define GET_STRING(a,b,c,d) cfg_get_string(a, b, c, d); TRACE("%s=%s\n", a, c)
2021-06-11 20:30:43 +02:00
CNCDDRAWCONFIG g_config =
2023-07-03 05:13:47 +02:00
{ .window_rect = {.left = -32000, .top = -32000, .right = 0, .bottom = 0 }, .window_state = -1, .borderless_state = -1 };
2020-10-13 09:20:52 +02:00
void cfg_load()
{
2021-09-16 03:11:47 +02:00
cfg_init();
2023-09-22 00:38:42 +02:00
/* Optional settings */
2021-09-29 12:55:20 +02:00
2023-09-22 01:47:00 +02:00
GET_INT(g_config.window_rect.right, "width", 0);
GET_INT(g_config.window_rect.bottom, "height", 0);
GET_BOOL(g_config.fullscreen, "fullscreen", FALSE);
GET_BOOL(g_config.windowed, "windowed", FALSE);
GET_BOOL(g_config.maintas, "maintas", FALSE);
GET_BOOL(g_config.boxing, "boxing", FALSE);
GET_INT(g_config.maxfps, "maxfps", -1);
GET_BOOL(g_config.vsync, "vsync", FALSE);
GET_BOOL(g_config.adjmouse, "adjmouse", TRUE);
GET_STRING("shader", "Shaders\\cubic\\catmull-rom-bilinear.glsl", g_config.shader, sizeof(g_config.shader));
GET_INT(g_config.window_rect.left, "posX", -32000);
GET_INT(g_config.window_rect.top, "posY", -32000);
GET_STRING("renderer", "auto", g_config.renderer, sizeof(g_config.renderer));
GET_BOOL(g_config.devmode, "devmode", FALSE);
GET_BOOL(g_config.border, "border", TRUE);
2023-09-22 02:08:26 +02:00
GET_INT(g_config.save_settings, "savesettings", 1);
2023-09-22 01:47:00 +02:00
GET_BOOL(g_config.resizable, "resizable", TRUE);
GET_INT(g_config.d3d9_filter, "d3d9_filter", FILTER_CUBIC);
GET_BOOL(g_config.vhack, "vhack", FALSE);
GET_STRING("screenshotdir", ".\\Screenshots\\", g_config.screenshot_dir, sizeof(g_config.screenshot_dir));
GET_BOOL(g_config.toggle_borderless, "toggle_borderless", FALSE);
2020-09-30 10:14:30 +02:00
2023-09-22 00:38:42 +02:00
/* Compatibility settings */
2018-12-10 04:24:30 +01:00
2023-09-22 01:47:00 +02:00
GET_BOOL(g_config.noactivateapp, "noactivateapp", FALSE);
GET_INT(g_config.maxgameticks, "maxgameticks", 0);
2023-09-23 17:48:06 +02:00
GET_INT(g_config.minfps, "minfps", 0);
2023-09-22 01:47:00 +02:00
GET_BOOL(g_config.nonexclusive, "nonexclusive", FALSE);
GET_BOOL(g_config.singlecpu, "singlecpu", TRUE);
GET_INT(g_config.resolutions, "resolutions", RESLIST_NORMAL);
GET_INT(g_config.fixchilds, "fixchilds", FIX_CHILDS_DETECT_PAINT);
GET_BOOL(g_config.hook_peekmessage, "hook_peekmessage", FALSE);
2020-10-18 02:40:45 +02:00
2023-09-22 00:38:42 +02:00
/* Undocumented settings */
2023-08-19 23:14:34 +02:00
2023-09-22 01:47:00 +02:00
GET_BOOL(g_config.releasealt, "releasealt", FALSE);
GET_BOOL(GameHandlesClose, "game_handles_close", FALSE);
GET_BOOL(g_config.fixnotresponding, "fixnotresponding", FALSE);
GET_INT(g_config.hook, "hook", 4);
GET_INT(g_config.guard_lines, "guard_lines", 200);
GET_INT(g_config.max_resolutions, "max_resolutions", 0);
GET_BOOL(g_config.limit_bltfast, "limit_bltfast", FALSE);
GET_BOOL(g_config.lock_surfaces, "lock_surfaces", FALSE);
GET_BOOL(g_config.allow_wmactivate, "allow_wmactivate", FALSE);
GET_BOOL(g_config.flipclear, "flipclear", FALSE);
GET_BOOL(g_config.fixmousehook, "fixmousehook", FALSE);
GET_BOOL(g_config.rgb555, "rgb555", FALSE);
GET_BOOL(g_config.no_dinput_hook, "no_dinput_hook", FALSE);
GET_INT(g_config.refresh_rate, "refresh_rate", 0);
GET_INT(g_config.anti_aliased_fonts_min_size, "anti_aliased_fonts_min_size", 13);
GET_INT(g_config.custom_width, "custom_width", 0);
GET_INT(g_config.custom_height, "custom_height", 0);
GET_INT(g_config.min_font_size, "min_font_size", 0);
2023-09-22 00:38:42 +02:00
/* Hotkeys */
2023-09-22 01:47:00 +02:00
GET_INT(g_config.hotkeys.toggle_fullscreen, "keytogglefullscreen", VK_RETURN);
GET_INT(g_config.hotkeys.toggle_maximize, "keytogglemaximize", VK_NEXT);
GET_INT(g_config.hotkeys.unlock_cursor1, "keyunlockcursor1", VK_TAB);
GET_INT(g_config.hotkeys.unlock_cursor2, "keyunlockcursor2", VK_RCONTROL);
GET_INT(g_config.hotkeys.screenshot, "keyscreenshot", VK_SNAPSHOT);
2023-09-22 00:38:42 +02:00
/* Game specific settings */
2023-09-22 01:47:00 +02:00
GET_BOOL(g_config.remove_menu, "remove_menu", FALSE); /* Added for HoMM4 */
2023-09-22 00:38:42 +02:00
2023-09-22 01:47:00 +02:00
GET_BOOL(g_config.armadahack, "armadahack", FALSE);
GET_BOOL(g_config.tshack, "tshack", FALSE);
GET_BOOL(g_config.infantryhack, "infantryhack", FALSE);
GET_BOOL(g_config.stronghold_hack, "stronghold_hack", FALSE);
GET_BOOL(g_config.mgs_hack, "mgs_hack", FALSE);
2023-09-23 17:48:06 +02:00
GameHandlesClose = GameHandlesClose || g_config.infantryhack;
}
2020-10-13 09:20:52 +02:00
void cfg_save()
{
2020-10-13 09:20:52 +02:00
if (!g_config.save_settings)
2020-09-30 10:14:30 +02:00
return;
char buf[16];
2021-06-11 20:30:43 +02:00
char* section = g_config.save_settings == 1 ? "ddraw" : g_config.process_file_name;
2020-10-13 09:20:52 +02:00
if (g_config.window_rect.right)
2018-10-25 09:31:40 +02:00
{
2020-10-13 09:20:52 +02:00
sprintf(buf, "%ld", g_config.window_rect.right);
WritePrivateProfileString(section, "width", buf, g_config.ini_path);
2018-10-27 16:44:09 +02:00
}
2021-06-11 20:30:43 +02:00
2020-10-13 09:20:52 +02:00
if (g_config.window_rect.bottom)
2018-10-27 16:44:09 +02:00
{
2020-10-13 09:20:52 +02:00
sprintf(buf, "%ld", g_config.window_rect.bottom);
WritePrivateProfileString(section, "height", buf, g_config.ini_path);
2018-10-27 16:44:09 +02:00
}
2020-10-13 09:20:52 +02:00
if (g_config.window_rect.left != -32000)
2018-10-27 16:44:09 +02:00
{
2020-10-13 09:20:52 +02:00
sprintf(buf, "%ld", g_config.window_rect.left);
WritePrivateProfileString(section, "posX", buf, g_config.ini_path);
2018-10-25 09:31:40 +02:00
}
2020-10-13 09:20:52 +02:00
if (g_config.window_rect.top != -32000)
2018-10-25 09:31:40 +02:00
{
2020-10-13 09:20:52 +02:00
sprintf(buf, "%ld", g_config.window_rect.top);
WritePrivateProfileString(section, "posY", buf, g_config.ini_path);
2018-11-07 23:28:19 +01:00
}
2020-10-13 09:20:52 +02:00
if (g_config.window_state != -1)
2018-11-07 23:28:19 +01:00
{
2020-10-13 09:20:52 +02:00
WritePrivateProfileString(section, "windowed", g_config.window_state ? "true" : "false", g_config.ini_path);
2018-10-25 09:31:40 +02:00
}
2023-07-03 05:13:47 +02:00
if (g_config.borderless_state != -1)
{
WritePrivateProfileString(section, "fullscreen", g_config.borderless_state ? "true" : "false", g_config.ini_path);
}
}
2020-10-13 09:20:52 +02:00
static void cfg_create_ini()
{
2021-06-11 20:30:43 +02:00
FILE* fh = fopen(g_config.ini_path, "w");
if (fh)
{
fputs(
2022-10-05 15:59:43 +02:00
"; cnc-ddraw - https://github.com/FunkyFr3sh/cnc-ddraw\n"
"\n"
"[ddraw]\n"
"; ### Optional settings ###\n"
"; Use the following settings to adjust the look and feel to your liking\n"
"\n"
"\n"
"; Stretch to custom resolution, 0 = defaults to the size game requests\n"
"width=0\n"
"height=0\n"
"\n"
"; Override the width/height settings shown above and always stretch to fullscreen\n"
"; Note: Can be combined with 'windowed=true' to get windowed-fullscreen aka borderless mode\n"
2023-09-26 02:27:00 +02:00
"fullscreen=true\n"
"\n"
"; Run in windowed mode rather than going fullscreen\n"
2023-09-26 02:27:00 +02:00
"windowed=true\n"
"\n"
2021-06-16 05:57:19 +02:00
"; Maintain aspect ratio\n"
"maintas=false\n"
"\n"
2021-06-16 05:57:19 +02:00
"; Windowboxing / Integer Scaling\n"
"boxing=false\n"
"\n"
"; Real rendering rate, -1 = screen rate, 0 = unlimited, n = cap\n"
"; Note: Does not have an impact on the game speed, to limit your game speed use 'maxgameticks='\n"
2021-02-18 11:14:26 +01:00
"maxfps=-1\n"
"\n"
"; Vertical synchronization, enable if you get tearing - (Requires 'renderer=auto/opengl*/direct3d9*')\n"
2020-10-06 21:08:29 +02:00
"; Note: vsync=true can fix tearing but it will cause input lag\n"
"vsync=false\n"
"\n"
2021-06-16 05:57:19 +02:00
"; Automatic mouse sensitivity scaling\n"
"; Note: Only works if stretching is enabled. Sensitivity will be adjusted according to the size of the window\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
"\n"
"; Preliminary libretro shader support - (Requires 'renderer=opengl*') https://github.com/libretro/glsl-shaders\n"
2020-10-06 21:08:29 +02:00
"; 2x scaling example: https://imgur.com/a/kxsM1oY - 4x scaling example: https://imgur.com/a/wjrhpFV\n"
"; You can specify a full path to a .glsl shader file here or use one of the values listed below\n"
2023-08-29 18:24:32 +02:00
"; Possible values: Nearest neighbor, Bilinear, Bicubic, Lanczos, xBR-lv2\n"
"shader=Shaders\\cubic\\catmull-rom-bilinear.glsl\n"
"\n"
"; Window position, -32000 = center to screen\n"
"posX=-32000\n"
"posY=-32000\n"
"\n"
"; Renderer, possible values: auto, opengl, openglcore, gdi, direct3d9, direct3d9on12 (auto = try direct3d9/opengl, fallback = gdi)\n"
2023-09-26 02:27:00 +02:00
"renderer=opengl\n"
"\n"
"; Developer mode (don't lock the cursor)\n"
"devmode=false\n"
"\n"
"; Show window borders in windowed mode\n"
"border=true\n"
"\n"
2020-09-30 10:14:30 +02:00
"; Save window position/size/state on game exit and restore it automatically on next game start\n"
"; Possible values: 0 = disabled, 1 = save to global 'ddraw' section, 2 = save to game specific section\n"
"savesettings=1\n"
2020-09-30 10:14:30 +02:00
"\n"
2021-06-05 02:51:24 +02:00
"; Should the window be resizable by the user in windowed mode?\n"
2021-06-05 02:50:23 +02:00
"resizable=true\n"
"\n"
"; Upscaling filter for the direct3d9* renderers\n"
2023-08-23 16:44:14 +02:00
"; Possible values: 0 = nearest-neighbor, 1 = bilinear, 2 = bicubic, 3 = lanczos (bicubic/lanczos only support 16/32bit color depth games)\n"
2023-07-04 20:13:49 +02:00
"d3d9_filter=2\n"
"\n"
"; Enable upscale hack for high resolution patches (Supports C&C1, Red Alert 1 and KKND Xtreme)\n"
"vhack=false\n"
"\n"
"; Where should screenshots be saved\n"
"screenshotdir=.\\Screenshots\\\n"
"\n"
2023-07-03 05:13:47 +02:00
"; Switch between windowed/borderless modes with alt+enter rather than windowed/fullscreen modes\n"
2023-09-26 02:27:00 +02:00
"toggle_borderless=true\n"
2023-07-03 05:13:47 +02:00
"\n"
"\n"
"\n"
"; ### Compatibility settings ###\n"
"; Use the following settings in case there are any issues with the game\n"
"\n"
"\n"
"; Hide WM_ACTIVATEAPP and WM_NCACTIVATE messages to prevent problems on alt+tab\n"
2023-09-26 02:27:00 +02:00
"noactivateapp=true\n"
"\n"
2021-02-19 03:24:11 +01:00
"; Max game ticks per second, possible values: -1 = disabled, -2 = refresh rate, 0 = emulate 60hz vblank, 1-1000 = custom game speed\n"
"; Note: Can be used to slow down a too fast running game, fix flickering or too fast animations\n"
2020-10-06 21:08:29 +02:00
"; Note: Usually one of the following values will work: 60 / 30 / 25 / 20 / 15 (lower value = slower game speed)\n"
"maxgameticks=0\n"
"\n"
2021-05-29 15:29:57 +02:00
"; Force minimum FPS, possible values: 0 = disabled, -1 = use 'maxfps=' value, -2 = same as -1 but force full redraw, 1-1000 = custom FPS\n"
2020-10-18 02:40:45 +02:00
"; Note: Set this to a low value such as 5 or 10 if some parts of the game are not being displayed (e.g. menus or loading screens)\n"
"minfps=0\n"
2020-01-23 08:58:22 +01:00
"\n"
"; Disable fullscreen-exclusive mode for the direct3d9*/opengl* renderers\n"
"; Note: Can be used in case some GUI elements like buttons/textboxes/videos/etc.. are invisible\n"
2023-09-26 02:27:00 +02:00
"nonexclusive=true\n"
"\n"
2020-09-27 05:13:15 +02:00
"; Force CPU0 affinity, avoids crashes/freezing, *might* have a performance impact\n"
2023-08-13 20:35:36 +02:00
"; Note: Disable this if the game is not running smooth or there are sound issues\n"
2023-09-26 02:27:00 +02:00
"singlecpu=false\n"
2020-09-27 05:13:15 +02:00
"\n"
2021-08-04 16:17:28 +02:00
"; Available resolutions, possible values: 0 = Small list, 1 = Very small list, 2 = Full list\n"
2023-08-11 19:05:11 +02:00
"; Note: Set this to 2 if your chosen resolution is not working or does not show up in the list\n"
2023-08-13 20:35:36 +02:00
"; Note: Set this to 1 if the game is crashing on startup\n"
2021-08-04 16:17:28 +02:00
"resolutions=0\n"
"\n"
"; Child window handling, possible values: 0 = Disabled, 1 = Display top left, 2 = Display top left + repaint, 3 = Hide\n"
2023-08-11 18:00:35 +02:00
"; Note: Disables upscaling if a child window was detected (to ensure the game is fully playable, may look weird though)\n"
2021-08-10 14:12:06 +02:00
"fixchilds=2\n"
"\n"
2023-08-11 18:00:35 +02:00
"; Enable the following setting if your cursor doesn't work properly when upscaling is enabled\n"
"hook_peekmessage=false\n"
"\n"
2023-08-11 18:00:35 +02:00
"\n"
"; Undocumented settings - You may or may not change these (You should rather focus on the settings above)\n"
"releasealt=false\n"
"game_handles_close=false\n"
"fixnotresponding=false\n"
2023-08-13 20:31:26 +02:00
"hook=4\n"
"guard_lines=200\n"
"max_resolutions=0\n"
"limit_bltfast=false\n"
2022-09-17 13:46:45 +02:00
"lock_surfaces=false\n"
"allow_wmactivate=false\n"
2022-09-13 07:41:01 +02:00
"flipclear=false\n"
2022-10-15 18:28:23 +02:00
"fixmousehook=false\n"
2023-02-16 16:24:43 -08:00
"rgb555=false\n"
2023-07-28 13:53:57 +02:00
"no_dinput_hook=false\n"
2023-08-18 16:48:59 +02:00
"refresh_rate=0\n"
"anti_aliased_fonts_min_size=13\n"
2023-09-14 01:06:37 +02:00
"custom_width=0\n"
"custom_height=0\n"
2023-09-16 10:08:15 +12:00
"min_font_size=0\n"
"\n"
"\n"
"\n"
2021-09-29 12:55:20 +02:00
"; ### Hotkeys ###\n"
"; Use the following settings to configure your hotkeys, 0x00 = disabled\n"
"; Virtual-Key Codes: https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes\n"
"\n"
"\n"
2021-09-29 13:12:23 +02:00
"; Switch between windowed and fullscreen mode = [Alt] + ???\n"
2021-09-29 12:55:20 +02:00
"keytogglefullscreen=0x0D\n"
"\n"
2023-07-31 12:12:33 +02:00
"; Maximize window = [Alt] + ???\n"
2021-09-29 12:55:20 +02:00
"keytogglemaximize=0x22\n"
"\n"
2021-09-29 13:12:23 +02:00
"; Unlock cursor 1 = [Ctrl] + ???\n"
2021-09-29 12:55:20 +02:00
"keyunlockcursor1=0x09\n"
"\n"
2021-09-29 13:12:23 +02:00
"; Unlock cursor 2 = [Right Alt] + ???\n"
2021-09-29 12:55:20 +02:00
"keyunlockcursor2=0xA3\n"
"\n"
"; Screenshot\n"
"keyscreenshot=0x2C\n"
"\n"
"\n"
"\n"
"; ### Config program settings ###\n"
"; The following settings are for cnc-ddraw config.exe\n"
2023-08-21 12:34:45 +02:00
"\n"
"\n"
"; cnc-ddraw config program language, possible values: auto, english, chinese, german, spanish, russian, hungarian, french, italian\n"
"configlang=auto\n"
"\n"
"; cnc-ddraw config program theme, possible values: Windows10, Cobalt XEMedia\n"
"configtheme=Windows10\n"
"\n"
2023-08-21 12:34:45 +02:00
"; Hide the 'Compatibility Settings' tab in cnc-ddraw config\n"
"hide_compat_tab=false\n"
"\n"
"; Allow the users to 'Restore default settings' via cnc-ddraw config\n"
"allow_reset=true\n"
"\n"
"\n"
"\n"
"; ### Game specific settings ###\n"
"; The following settings override all settings shown above, section name = executable name\n"
"\n"
"\n"
2022-09-05 09:08:59 +02:00
"; Atrox\n"
"[Atrox]\n"
"renderer=gdi\n"
"hook=2\n"
"fixchilds=0\n"
2022-09-05 09:08:59 +02:00
"allow_wmactivate=true\n"
"\n"
2021-06-04 02:01:47 +02:00
"; Atomic Bomberman\n"
"[BM]\n"
"maxgameticks=60\n"
2018-11-14 09:12:56 +01:00
"\n"
"; Age of Empires\n"
"[empires]\n"
2021-06-06 03:01:33 +02:00
"nonexclusive=true\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-10 03:50:07 +02:00
"resolutions=2\n"
"\n"
"; Age of Empires: The Rise of Rome\n"
"[empiresx]\n"
2021-06-06 03:01:33 +02:00
"nonexclusive=true\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-10 03:50:07 +02:00
"resolutions=2\n"
"\n"
"; Age of Empires II\n"
"[EMPIRES2]\n"
2021-06-06 03:01:33 +02:00
"nonexclusive=true\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
"\n"
"; Age of Empires II: The Conquerors\n"
"[age2_x1]\n"
2021-06-06 03:01:33 +02:00
"nonexclusive=true\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
"\n"
2022-09-22 10:43:08 +02:00
"; American Conquest / Cossacks\n"
2021-06-04 15:36:50 +02:00
"[DMCR]\n"
2022-09-22 09:56:28 +02:00
"resolutions=2\n"
"guard_lines=300\n"
2021-06-04 15:36:50 +02:00
"minfps=-2\n"
"\n"
2021-06-04 02:01:47 +02:00
"; Age of Wonders 2\n"
"[AoW2]\n"
2023-08-11 13:13:10 +02:00
"resolutions=2\n"
2023-07-29 09:19:48 +02:00
"renderer=opengl\n"
"singlecpu=false\n"
"\n"
"; Age of Wonders 2\n"
"[AoW2Compat]\n"
2023-08-11 13:13:10 +02:00
"resolutions=2\n"
2023-07-29 09:19:48 +02:00
"renderer=opengl\n"
"singlecpu=false\n"
"\n"
2023-08-11 13:13:10 +02:00
"; Age of Wonders 2 Config Tool\n"
"[aow2Setup]\n"
"resolutions=2\n"
"\n"
2023-07-29 09:19:48 +02:00
"; Age of Wonders: Shadow Magic\n"
"[AoWSM]\n"
2023-08-11 13:13:10 +02:00
"resolutions=2\n"
2023-07-29 09:19:48 +02:00
"renderer=opengl\n"
"singlecpu=false\n"
"\n"
"; Age of Wonders: Shadow Magic\n"
"[AoWSMCompat]\n"
2023-08-11 13:13:10 +02:00
"resolutions=2\n"
2023-07-29 09:19:48 +02:00
"renderer=opengl\n"
"singlecpu=false\n"
2021-06-04 02:01:47 +02:00
"\n"
2023-08-11 13:13:10 +02:00
"; Age of Wonders: Shadow Magic Config Tool\n"
"[AoWSMSetup]\n"
"resolutions=2\n"
"\n"
2021-06-04 02:01:47 +02:00
"; Anstoss 3\n"
"[anstoss3]\n"
"renderer=gdi\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-04 02:01:47 +02:00
"\n"
"; Anno 1602\n"
"[1602]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2018-10-30 19:38:32 +01:00
"\n"
2021-06-04 02:01:47 +02:00
"; Alien Nations\n"
"[AN]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-04 02:01:47 +02:00
"\n"
"; Atlantis\n"
"[ATLANTIS]\n"
2021-08-08 23:03:35 +02:00
"renderer=opengl\n"
"maxgameticks=60\n"
2018-10-31 00:33:21 +01:00
"\n"
"; Airline Tycoon Deluxe\n"
"[AT]\n"
"fixchilds=0\n"
"\n"
2022-10-15 20:05:44 +02:00
"; Baldur's Gate II\n"
2022-10-15 20:11:43 +02:00
"; Note: 'Use 3D Acceleration' must be disabled and 'Full Screen' must be enabled in BGConfig.exe\n"
2022-10-15 20:05:44 +02:00
"[BGMain]\n"
"resolutions=2\n"
"\n"
2023-07-18 19:21:18 +02:00
"; BALDR FORCE EXE\n"
"[BaldrForce]\n"
"noactivateapp=true\n"
"\n"
2021-06-04 02:01:47 +02:00
"; Blade & Sword\n"
"[comeon]\n"
2023-08-01 13:54:22 +02:00
"maxgameticks=60\n"
"fixchilds=3\n"
"\n"
2021-06-06 03:01:33 +02:00
"; Blood II - The Chosen / Shogo - Mobile Armor Division\n"
"[Client]\n"
"checkfile=.\\SOUND.REZ\n"
"noactivateapp=true\n"
"\n"
2021-06-04 02:01:47 +02:00
"; Carmageddon\n"
"[CARMA95]\n"
"noactivateapp=true\n"
2022-09-13 07:41:01 +02:00
"flipclear=true\n"
2021-06-04 02:01:47 +02:00
"\n"
"; Carmageddon\n"
"[CARM95]\n"
"noactivateapp=true\n"
2022-09-13 07:41:58 +02:00
"flipclear=true\n"
"\n"
"; Carmageddon 2\n"
2018-11-02 02:21:16 +01:00
"[Carma2_SW]\n"
"noactivateapp=true\n"
"\n"
2021-06-18 03:51:12 +02:00
"; Captain Claw\n"
"[claw]\n"
"adjmouse=true\n"
2021-06-18 03:51:12 +02:00
"noactivateapp=true\n"
2023-07-02 17:16:47 +02:00
"nonexclusive=true\n"
2021-06-18 03:51:12 +02:00
"\n"
2022-02-25 00:18:02 +01:00
"; Command & Conquer: Sole Survivor\n"
"[SOLE]\n"
"maxgameticks=120\n"
"maxfps=60\n"
"minfps=-1\n"
"\n"
2021-06-04 15:36:50 +02:00
"; Command & Conquer Gold - CnCNet\n"
"[cnc95]\n"
"maxfps=125\n"
"\n"
2021-06-04 02:01:47 +02:00
"; Command & Conquer Gold\n"
"[C&C95]\n"
"maxgameticks=120\n"
"maxfps=60\n"
"minfps=-1\n"
"\n"
"; Command & Conquer: Red Alert - CnCNet\n"
"[ra95-spawn]\n"
"maxfps=125\n"
2021-06-04 02:01:47 +02:00
"\n"
"; Command & Conquer: Red Alert\n"
"[ra95]\n"
"maxgameticks=120\n"
"maxfps=60\n"
"minfps=-1\n"
"\n"
"; Command & Conquer: Red Alert\n"
"[ra95_Mod-Launcher]\n"
"maxgameticks=120\n"
"maxfps=60\n"
"minfps=-1\n"
2021-06-04 02:01:47 +02:00
"\n"
"; Command & Conquer: Red Alert\n"
"[ra95p]\n"
"maxfps=60\n"
"minfps=-1\n"
"\n"
"; Command & Conquer: Tiberian Sun / Command & Conquer: Red Alert 2\n"
2018-11-15 10:47:18 +01:00
"[game]\n"
"checkfile=.\\blowfish.dll\n"
2021-06-18 12:18:35 +02:00
"tshack=true\n"
"noactivateapp=true\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
"maxfps=60\n"
2020-10-18 02:40:45 +02:00
"minfps=-1\n"
2021-06-16 05:57:19 +02:00
"maintas=false\n"
"boxing=false\n"
2018-11-15 10:47:18 +01:00
"\n"
2019-01-28 20:25:45 +01:00
"; Command & Conquer: Tiberian Sun Demo\n"
"[SUN]\n"
"noactivateapp=true\n"
2021-06-18 12:18:35 +02:00
"tshack=true\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2019-01-28 20:25:45 +01:00
"maxfps=60\n"
2020-10-18 02:40:45 +02:00
"minfps=-1\n"
2021-06-16 05:57:19 +02:00
"maintas=false\n"
"boxing=false\n"
2019-01-28 20:25:45 +01:00
"\n"
"; Command & Conquer: Tiberian Sun - CnCNet\n"
2018-11-15 10:47:18 +01:00
"[ts-spawn]\n"
"noactivateapp=true\n"
2021-06-18 12:18:35 +02:00
"tshack=true\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
"maxfps=60\n"
2020-10-18 02:40:45 +02:00
"minfps=-1\n"
2021-06-16 05:57:19 +02:00
"maintas=false\n"
"boxing=false\n"
2018-11-15 10:47:18 +01:00
"\n"
"; Command & Conquer: Red Alert 2 - XWIS\n"
"[ra2]\n"
"noactivateapp=true\n"
2021-06-18 12:18:35 +02:00
"tshack=true\n"
"maxfps=60\n"
2020-10-18 02:40:45 +02:00
"minfps=-1\n"
2021-06-16 05:57:19 +02:00
"maintas=false\n"
"boxing=false\n"
"\n"
"; Command & Conquer: Red Alert 2 - XWIS\n"
"[Red Alert 2]\n"
"noactivateapp=true\n"
2021-06-18 12:18:35 +02:00
"tshack=true\n"
"maxfps=60\n"
2020-10-18 02:40:45 +02:00
"minfps=-1\n"
2021-06-16 05:57:19 +02:00
"maintas=false\n"
"boxing=false\n"
"\n"
2018-11-15 10:47:18 +01:00
"; Command & Conquer: Red Alert 2: Yuri's Revenge\n"
"[gamemd]\n"
"noactivateapp=true\n"
2021-06-18 12:18:35 +02:00
"tshack=true\n"
"maxfps=60\n"
2020-10-18 02:40:45 +02:00
"minfps=-1\n"
2021-06-16 05:57:19 +02:00
"maintas=false\n"
"boxing=false\n"
2018-11-15 10:47:18 +01:00
"\n"
2020-01-22 07:23:27 +01:00
"; Command & Conquer: Red Alert 2: Yuri's Revenge - ?ModExe?\n"
"[ra2md]\n"
"noactivateapp=true\n"
2021-06-18 12:18:35 +02:00
"tshack=true\n"
2020-01-22 07:23:27 +01:00
"maxfps=60\n"
2020-10-18 02:40:45 +02:00
"minfps=-1\n"
2021-06-16 05:57:19 +02:00
"maintas=false\n"
"boxing=false\n"
2020-01-22 07:23:27 +01:00
"\n"
"; Command & Conquer: Red Alert 2: Yuri's Revenge - CnCNet\n"
2018-11-15 10:47:18 +01:00
"[gamemd-spawn]\n"
"noactivateapp=true\n"
2021-06-18 12:18:35 +02:00
"tshack=true\n"
"maxfps=60\n"
2020-10-18 02:40:45 +02:00
"minfps=-1\n"
2021-06-16 05:57:19 +02:00
"maintas=false\n"
"boxing=false\n"
2018-11-15 10:47:18 +01:00
"\n"
"; Command & Conquer: Red Alert 2: Yuri's Revenge - XWIS\n"
"[Yuri's Revenge]\n"
"noactivateapp=true\n"
2021-06-18 12:18:35 +02:00
"tshack=true\n"
"maxfps=60\n"
2020-10-18 02:40:45 +02:00
"minfps=-1\n"
2021-06-16 05:57:19 +02:00
"maintas=false\n"
"boxing=false\n"
"\n"
2023-09-09 16:21:37 +02:00
"; Commandos\n"
"[comandos]\n"
"maxgameticks=-1\n"
"\n"
"; Commandos\n"
"[comandos_w10]\n"
"maxgameticks=-1\n"
"\n"
2021-06-04 02:01:47 +02:00
"; Caesar III\n"
"[c3]\n"
2021-06-06 03:01:33 +02:00
"nonexclusive=true\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-04 02:01:47 +02:00
"\n"
"; Chris Sawyer's Locomotion\n"
"[LOCO]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-04 02:01:47 +02:00
"\n"
"; Cultures 2\n"
"[Cultures2]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-04 02:01:47 +02:00
"\n"
"; Cultures 2 MP\n"
"[Cultures2MP]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-04 02:01:47 +02:00
"\n"
"; Close Combat 2: A Bridge Too Far\n"
"[cc2]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2020-10-06 20:48:43 +02:00
"nonexclusive=true\n"
2020-10-02 22:33:07 +02:00
"\n"
2021-06-04 02:01:47 +02:00
"; Close Combat 3: The Russian Front\n"
"[cc3]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
"nonexclusive=true\n"
"\n"
2021-06-04 02:01:47 +02:00
"; Close Combat 4: The Battle of the Bulge\n"
"[cc4]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-04 02:01:47 +02:00
"nonexclusive=true\n"
"\n"
2021-06-04 02:01:47 +02:00
"; Close Combat 5: Invasion: Normandy\n"
"[cc5]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-04 02:01:47 +02:00
"nonexclusive=true\n"
"\n"
2021-06-04 02:01:47 +02:00
"; Call To Power 2\n"
"[ctp2]\n"
2021-06-18 06:11:13 +02:00
"maintas=false\n"
"boxing=false\n"
2021-06-04 02:01:47 +02:00
"\n"
"; Corsairs Gold\n"
"[corsairs]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
"\n"
2022-09-05 03:53:59 +02:00
"; Divine Divinity\n"
"[div]\n"
"resolutions=2\n"
"singlecpu=false\n"
"\n"
2021-06-15 09:40:55 +02:00
"; Dragon Throne: Battle of Red Cliffs\n"
"[AdSanguo]\n"
"maxgameticks=60\n"
"noactivateapp=true\n"
"limit_bltfast=true\n"
2021-06-15 09:40:55 +02:00
"\n"
2021-06-04 02:01:47 +02:00
"; Dark Reign: The Future of War\n"
"[DKReign]\n"
"maxgameticks=60\n"
"\n"
2020-10-15 08:09:13 +02:00
"; Dungeon Keeper 2\n"
"[DKII]\n"
"maxgameticks=60\n"
"noactivateapp=true\n"
"\n"
2021-06-18 06:06:11 +02:00
"; Deadlock 2\n"
"[DEADLOCK]\n"
2021-08-10 14:12:06 +02:00
"fixchilds=0\n"
2021-06-18 06:06:11 +02:00
"adjmouse=false\n"
2021-06-18 06:11:13 +02:00
"maintas=false\n"
"boxing=false\n"
2021-06-18 06:06:11 +02:00
"\n"
"; Diablo\n"
"[Diablo]\n"
"devmode=true\n"
"\n"
"; Diablo: Hellfire\n"
"[hellfire]\n"
"devmode=true\n"
"\n"
2023-02-27 20:45:08 +13:00
"; Escape Velocity Nova\n"
"[EV Nova]\n"
"devmode=true\n"
2023-02-27 18:25:28 +01:00
"hook_peekmessage=true\n"
2023-02-27 20:45:08 +13:00
"rgb555=true\n"
"keytogglefullscreen=0x46\n"
"adjmouse=true\n"
2023-02-27 20:45:08 +13:00
"\n"
2021-08-18 16:25:45 +02:00
"; Economic War\n"
"[EcoW]\n"
"maxgameticks=60\n"
"fixnotresponding=true\n"
2021-08-18 16:25:45 +02:00
"\n"
"; Fairy Tale About Father Frost, Ivan and Nastya\n"
"[mrazik]\n"
"guard_lines=0\n"
"\n"
2021-06-09 01:59:47 +02:00
"; Future Cop - L.A.P.D.\n"
"[FCopLAPD]\n"
2022-10-07 01:05:35 +02:00
"nonexclusive=true\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-09 01:59:47 +02:00
"\n"
2021-06-15 09:40:55 +02:00
"; G-Police\n"
"[GPOLICE]\n"
"maxgameticks=60\n"
"\n"
2021-06-04 02:01:47 +02:00
"; Gangsters: Organized Crime\n"
"[gangsters]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-04 02:01:47 +02:00
"nonexclusive=true\n"
2020-10-22 21:40:46 +02:00
"\n"
2021-06-04 02:01:47 +02:00
"; Grand Theft Auto\n"
"[Grand Theft Auto]\n"
"singlecpu=false\n"
2020-10-22 22:20:19 +02:00
"\n"
2021-06-04 15:36:50 +02:00
"; Grand Theft Auto: London 1969\n"
2021-06-04 02:01:47 +02:00
"[gta_uk]\n"
"singlecpu=false\n"
2020-10-22 22:20:19 +02:00
"\n"
2021-06-04 15:36:50 +02:00
"; Grand Theft Auto: London 1961\n"
2021-06-04 02:01:47 +02:00
"[Gta_61]\n"
"singlecpu=false\n"
2020-10-23 18:06:35 +02:00
"\n"
2021-06-15 09:40:55 +02:00
"; Heroes of Might and Magic II: The Succession Wars\n"
"[HEROES2W]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-15 09:40:55 +02:00
"\n"
2023-08-13 21:55:47 +02:00
"; Heroes of Might and Magic III\n"
"[Heroes3]\n"
"game_handles_close=true\n"
"\n"
"; Heroes of Might and Magic III HD Mod\n"
"[Heroes3 HD]\n"
"game_handles_close=true\n"
"\n"
2021-06-04 02:01:47 +02:00
"; Hard Truck: Road to Victory\n"
"[htruck]\n"
"maxgameticks=25\n"
"renderer=opengl\n"
"noactivateapp=true\n"
2020-10-23 18:06:35 +02:00
"\n"
2023-08-19 18:03:00 +02:00
"; Icewind Dale 2\n"
"; Note: 'Full Screen' must be enabled in Config.exe\n"
2023-08-19 19:11:20 +02:00
"; Note: 1070x602 is the lowest possible 16:9 resolution for the Widescreen patch (600/601 height will crash)\n"
2023-08-19 18:03:00 +02:00
"[iwd2]\n"
"resolutions=2\n"
"custom_width=1070\n"
"custom_height=602\n"
2023-08-19 18:03:00 +02:00
"\n"
2021-06-04 02:01:47 +02:00
"; Invictus\n"
"[Invictus]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-04 23:20:05 +02:00
"renderer=opengl\n"
2021-04-02 00:24:22 +02:00
"\n"
2021-06-04 02:01:47 +02:00
"; Interstate 76\n"
"[i76]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-05-04 22:49:22 +02:00
"\n"
2022-02-05 04:03:00 +01:00
"; Infantry Online\n"
"[infantry]\n"
"devmode=true\n"
"resolutions=2\n"
"infantryhack=true\n"
"max_resolutions=90\n"
2022-02-05 04:03:00 +01:00
"\n"
2021-06-02 01:52:45 +02:00
"; Jagged Alliance 2\n"
2021-05-05 17:47:35 +02:00
"[ja2]\n"
2022-09-05 05:51:15 +02:00
"singlecpu=false\n"
"fixmousehook=true\n"
"noactivateapp=true\n"
"releasealt=true\n"
"\n"
"; Jagged Alliance 2: Unfinished Business\n"
"[JA2UB]\n"
"singlecpu=false\n"
"fixmousehook=true\n"
"noactivateapp=true\n"
"releasealt=true\n"
"\n"
"; Jagged Alliance 2: Wildfire\n"
"[WF6]\n"
2022-09-05 05:51:15 +02:00
"singlecpu=false\n"
"fixmousehook=true\n"
"noactivateapp=true\n"
"releasealt=true\n"
"\n"
"; Jagged Alliance 2 - UC mod\n"
"[JA2_UC]\n"
2022-09-05 05:51:15 +02:00
"singlecpu=false\n"
"fixmousehook=true\n"
"noactivateapp=true\n"
"releasealt=true\n"
"\n"
"; Jagged Alliance 2 - Vengeance Reloaded mod\n"
"[JA2_Vengeance]\n"
2022-09-05 05:51:15 +02:00
"singlecpu=false\n"
"fixmousehook=true\n"
"noactivateapp=true\n"
"releasealt=true\n"
2021-05-05 17:47:35 +02:00
"\n"
2021-06-06 19:02:51 +02:00
"; Kings Quest 8\n"
"[Mask]\n"
"renderer=opengl\n"
"\n"
2021-06-04 04:42:28 +02:00
"; Konung\n"
"[konung]\n"
2021-08-10 18:03:58 +02:00
"fixchilds=0\n"
2021-06-04 04:42:28 +02:00
"\n"
"; Konung 2\n"
"[Konung2]\n"
2021-08-10 18:03:58 +02:00
"fixchilds=0\n"
2021-06-04 04:42:28 +02:00
"\n"
2021-06-04 02:01:47 +02:00
"; KKND Xtreme (With high resolution patch)\n"
"[KKNDgame]\n"
"vhack=true\n"
"\n"
"; KKND2: Krossfire\n"
"[KKND2]\n"
"noactivateapp=true\n"
"\n"
2021-09-19 04:28:45 +02:00
"; Lionheart\n"
"[Lionheart]\n"
"hook_peekmessage=true\n"
2021-09-19 04:28:45 +02:00
"\n"
2021-06-08 05:47:30 +02:00
"; Majesty Gold\n"
"[Majesty]\n"
"minfps=-2\n"
"\n"
"; Majesty Gold HD\n"
"[MajestyHD]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-08 05:47:30 +02:00
"\n"
"; Majesty Gold HD\n"
"[MajestyHD - Old]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-08 05:47:30 +02:00
"\n"
2021-08-08 21:16:26 +02:00
"; Mech Warrior 3\n"
"[Mech3]\n"
"nonexclusive=true\n"
"\n"
2021-05-11 21:53:12 +02:00
"; Moorhuhn 2\n"
"[Moorhuhn2]\n"
2022-10-20 00:13:21 +02:00
"releasealt=true\n"
2021-05-11 21:53:12 +02:00
"\n"
2023-03-06 01:46:52 +01:00
"; New Robinson\n"
"[ROBY]\n"
"adjmouse=true\n"
2023-03-06 03:26:06 +01:00
"hook_peekmessage=true\n"
2023-03-06 01:46:52 +01:00
"\n"
2023-09-01 23:24:51 +02:00
"; Nox\n"
"[NOX]\n"
"checkfile=.\\NOX.ICD\n"
"renderer=direct3d9\n"
"nonexclusive=false\n"
"windowed=false\n"
"\n"
2021-06-04 02:01:47 +02:00
"; Outlaws\n"
"[olwin]\n"
2021-05-15 06:33:29 +02:00
"noactivateapp=true\n"
2021-06-04 02:01:47 +02:00
"maxgameticks=60\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-05-15 06:33:29 +02:00
"renderer=gdi\n"
"\n"
2021-06-04 02:01:47 +02:00
"; Pharaoh\n"
"[Pharaoh]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-05-23 15:49:03 +02:00
"\n"
2021-06-04 02:01:47 +02:00
"; Pax Imperia\n"
"[Pax Imperia]\n"
"nonexclusive=true\n"
2021-05-24 09:48:11 +02:00
"\n"
2021-06-15 09:40:55 +02:00
"; Railroad Tycoon II\n"
"[RT2]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-15 09:40:55 +02:00
"\n"
"; ROAD RASH\n"
"[RoadRash]\n"
"adjmouse=true\n"
"fixchilds=1\n"
2021-06-15 09:40:55 +02:00
"\n"
2022-10-05 22:36:59 +02:00
"; Sim Copter\n"
"[SimCopter]\n"
"nonexclusive=true\n"
"\n"
2021-08-03 14:12:39 +02:00
"; Settlers 3\n"
"[s3]\n"
"nonexclusive=true\n"
"\n"
"; Star Trek - Armada\n"
"[Armada]\n"
2021-06-09 07:24:17 +02:00
"armadahack=true\n"
"nonexclusive=true\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
"maintas=false\n"
"boxing=false\n"
"\n"
2021-06-04 02:01:47 +02:00
"; Star Wars: Galactic Battlegrounds\n"
"[battlegrounds]\n"
2022-09-05 05:57:45 +02:00
"nonexclusive=true\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-05-24 10:20:12 +02:00
"\n"
2021-06-04 02:01:47 +02:00
"; Star Wars: Galactic Battlegrounds: Clone Campaigns\n"
"[battlegrounds_x1]\n"
2022-09-05 05:57:45 +02:00
"nonexclusive=true\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-05-28 20:48:52 +02:00
"\n"
2023-02-19 21:37:13 +01:00
"; Starcraft\n"
"[StarCraft]\n"
"game_handles_close=true\n"
"\n"
2021-09-19 04:24:22 +02:00
"; Space Rangers\n"
"[Rangers]\n"
"hook_peekmessage=true\n"
2021-09-19 04:24:22 +02:00
"\n"
2023-08-07 10:15:52 +02:00
"; Stronghold Crusader HD\n"
"[Stronghold Crusader]\n"
2023-08-14 20:53:36 +02:00
"resolutions=2\n"
2023-08-07 10:15:52 +02:00
"stronghold_hack=true\n"
"adjmouse=true\n"
"\n"
2021-06-04 02:01:47 +02:00
"; Stronghold Crusader Extreme HD\n"
"[Stronghold_Crusader_Extreme]\n"
2023-08-10 17:24:27 +02:00
"resolutions=2\n"
2023-08-07 10:15:52 +02:00
"stronghold_hack=true\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-04 02:01:47 +02:00
"\n"
"; Stronghold HD\n"
"[Stronghold]\n"
2023-08-10 17:24:27 +02:00
"resolutions=2\n"
2023-08-07 10:15:52 +02:00
"stronghold_hack=true\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-04 02:01:47 +02:00
"\n"
2021-08-04 17:17:22 +02:00
"; Sim City 3000\n"
"[SC3]\n"
"minfps=-2\n"
"\n"
2021-06-04 02:01:47 +02:00
"; Shadow Watch\n"
"[sw]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-04 02:01:47 +02:00
"\n"
2021-06-15 09:40:55 +02:00
"; Shadow Flare\n"
"[ShadowFlare]\n"
"nonexclusive=true\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
"maintas=false\n"
"boxing=false\n"
2021-06-15 09:40:55 +02:00
"\n"
"; Total Annihilation (Unofficial Beta Patch v3.9.02)\n"
"[TotalA]\n"
2023-08-18 14:04:37 +02:00
"max_resolutions=32\n"
2022-09-17 13:46:45 +02:00
"lock_surfaces=true\n"
2022-09-17 09:00:58 +02:00
"singlecpu=false\n"
"\n"
2022-09-19 14:29:34 +02:00
"; Total Annihilation Replay Viewer (Unofficial Beta Patch v3.9.02)\n"
"[Viewer]\n"
2023-08-18 14:04:37 +02:00
"max_resolutions=32\n"
2022-09-19 14:29:34 +02:00
"lock_surfaces=true\n"
"singlecpu=false\n"
"\n"
2023-08-18 11:22:09 +02:00
"; Total Annihilation: Kingdoms\n"
"[Kingdoms]\n"
"game_handles_close=true\n"
2023-08-18 13:33:41 +02:00
"max_resolutions=32\n"
2023-08-18 11:22:09 +02:00
"\n"
2021-06-15 09:40:55 +02:00
"; Three Kingdoms: Fate of the Dragon\n"
"[sanguo]\n"
"maxgameticks=60\n"
"noactivateapp=true\n"
"limit_bltfast=true\n"
2021-06-15 09:40:55 +02:00
"\n"
"; RollerCoaster Tycoon\n"
"[rct]\n"
2023-07-28 13:53:57 +02:00
"no_dinput_hook=true\n"
"singlecpu=false\n"
2023-07-28 07:02:03 +02:00
"maxfps=0\n"
2023-07-28 09:53:04 +02:00
"adjmouse=true\n"
"\n"
2021-06-04 02:01:47 +02:00
"; Twisted Metal\n"
"[TWISTED]\n"
"nonexclusive=true\n"
"maxgameticks=25\n"
"minfps=5\n"
2021-06-02 14:29:44 +02:00
"\n"
2021-06-04 02:01:47 +02:00
"; Twisted Metal 2\n"
"[Tm2]\n"
"nonexclusive=true\n"
"maxgameticks=60\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2022-10-02 20:56:06 +02:00
"fixchilds=1\n"
2021-06-16 05:57:19 +02:00
"maintas=false\n"
"boxing=false\n"
2021-06-03 20:39:29 +02:00
"\n"
2021-06-04 02:01:47 +02:00
"; Tzar: The Burden of the Crown\n"
"; Note: Must set 'DIRECTXDEVICE=0' in 'Tzar.ini'\n"
"[Tzar]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-04 02:01:47 +02:00
"\n"
"; Uprising\n"
"[uprising]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-04 02:01:47 +02:00
"\n"
"; Uprising 2\n"
"[Uprising 2]\n"
2021-06-06 19:11:18 +02:00
"renderer=opengl\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-04 02:01:47 +02:00
"\n"
"; Wizardry 8\n"
"[Wiz8]\n"
"fixmousehook=true\n"
"noactivateapp=true\n"
"releasealt=true\n"
"\n"
2021-06-04 02:01:47 +02:00
"; Worms Armageddon\n"
"[WA]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-05 02:50:39 +02:00
"width=0\n"
"height=0\n"
"resizable=false\n"
2021-06-04 02:01:47 +02:00
"\n"
"; War Wind\n"
"[WW]\n"
2023-08-15 13:38:10 +02:00
"minfps=-1\n"
2021-06-03 20:39:29 +02:00
"\n"
2021-06-06 05:32:04 +02:00
"; Zeus and Poseidon\n"
"[Zeus]\n"
2021-06-16 05:57:19 +02:00
"adjmouse=true\n"
2021-06-06 05:32:04 +02:00
"\n"
, fh);
fclose(fh);
}
}
2023-08-05 05:02:49 +02:00
static void cfg_init()
{
2021-09-16 02:25:22 +02:00
/* get process filename and directory */
if (GetModuleFileNameA(NULL, g_config.game_path, sizeof(g_config.game_path) - 1) > 0)
{
_splitpath(g_config.game_path, NULL, NULL, g_config.process_file_name, g_config.process_file_ext);
2021-09-16 02:25:22 +02:00
int len = strlen(g_config.game_path) - strlen(g_config.process_file_name) - strlen(g_config.process_file_ext);
char* end = strstr(g_config.game_path + len, g_config.process_file_name);
2021-09-16 02:25:22 +02:00
if (end)
{
*end = 0;
}
else
{
g_config.game_path[0] = 0;
}
}
/* set up settings ini */
2021-09-16 03:11:47 +02:00
if (strlen(g_config.game_path) > 0)
{
_snprintf(g_config.ini_path, sizeof(g_config.ini_path) - 1, "%sddraw.ini", g_config.game_path);
if (GetFileAttributes(g_config.ini_path) == INVALID_FILE_ATTRIBUTES)
{
cfg_create_ini();
}
if (GetFileAttributes(g_config.ini_path) == INVALID_FILE_ATTRIBUTES)
{
strncpy(g_config.ini_path, ".\\ddraw.ini", sizeof(g_config.ini_path) - 1);
}
}
else
{
strncpy(g_config.ini_path, ".\\ddraw.ini", sizeof(g_config.ini_path) - 1);
}
if (GetFileAttributes(g_config.ini_path) == INVALID_FILE_ATTRIBUTES)
{
cfg_create_ini();
}
2021-09-16 02:25:22 +02:00
}
2023-09-22 00:38:42 +02:00
static DWORD cfg_get_string(LPCSTR key, LPCSTR default_value, LPSTR out_string, DWORD out_size)
2021-09-16 02:25:22 +02:00
{
if (!g_config.ini_path[0])
2021-09-16 03:11:47 +02:00
cfg_init();
2021-09-16 02:25:22 +02:00
2020-10-13 09:20:52 +02:00
DWORD s = GetPrivateProfileStringA(
2020-10-13 11:29:52 +02:00
g_config.process_file_name, key, "", out_string, out_size, g_config.ini_path);
2020-10-13 09:20:52 +02:00
if (s > 0)
{
char buf[MAX_PATH] = { 0 };
2020-10-13 09:20:52 +02:00
if (GetPrivateProfileStringA(
g_config.process_file_name, "checkfile", "", buf, sizeof(buf), g_config.ini_path) > 0)
{
if (GetFileAttributes(buf) != INVALID_FILE_ATTRIBUTES)
return s;
}
else
return s;
}
2020-10-13 11:29:52 +02:00
return GetPrivateProfileStringA("ddraw", key, default_value, out_string, out_size, g_config.ini_path);
}
2023-09-22 00:38:42 +02:00
static BOOL cfg_get_bool(LPCSTR key, BOOL default_value)
{
2019-01-28 21:11:34 +01:00
char value[8];
2020-10-13 11:29:52 +02:00
cfg_get_string(key, default_value ? "Yes" : "No", value, sizeof(value));
2019-01-28 21:11:34 +01:00
return (_stricmp(value, "yes") == 0 || _stricmp(value, "true") == 0 || _stricmp(value, "1") == 0);
}
2023-09-22 00:38:42 +02:00
static int cfg_get_int(LPCSTR key, int default_value)
{
2021-09-29 12:55:20 +02:00
char def_value[20];
2020-10-13 11:29:52 +02:00
_snprintf(def_value, sizeof(def_value), "%d", default_value);
2021-09-29 12:55:20 +02:00
char value[20];
2020-10-13 09:20:52 +02:00
cfg_get_string(key, def_value, value, sizeof(value));
2021-09-29 12:55:20 +02:00
if (strstr(value, "0x"))
{
return (int)strtol(value, NULL, 0);
}
else
{
return atoi(value);
}
}