1
0
mirror of synced 2024-11-24 05:50:12 +01:00
bananatools/mkacio/config.c
Kevin Trocolli 8ff356b84c add games
2023-09-18 04:05:22 -04:00

32 lines
1.7 KiB
C

#include <windows.h>
#include <assert.h>
#include <stddef.h>
#include <stdio.h>
#include "mkacio/config.h"
void mkac_io_najv4_config_load(struct mkac_najv4_config *cfg, const wchar_t *filename)
{
cfg->test = GetPrivateProfileIntW(L"najv4", L"test", VK_HOME, filename);
cfg->service = GetPrivateProfileIntW(L"najv4", L"service", VK_DELETE, filename);
cfg->coin = GetPrivateProfileIntW(L"najv4", L"coin", VK_INSERT, filename);
cfg->up = GetPrivateProfileIntW(L"najv4", L"up", VK_UP, filename);
cfg->down = GetPrivateProfileIntW(L"najv4", L"down", VK_DOWN, filename);
cfg->enter = GetPrivateProfileIntW(L"najv4", L"enter", VK_RETURN, filename);
}
void mkac_io_gamepad_config_load(struct mkac_gamepad_config *cfg, const wchar_t *filename)
{
cfg->dpad_up = GetPrivateProfileIntW(L"gamepad", L"dpad_up", 'W', filename);
cfg->dpad_down = GetPrivateProfileIntW(L"gamepad", L"dpad_down", 'S', filename);
cfg->dpad_left = GetPrivateProfileIntW(L"gamepad", L"dpad_left", 'A', filename);
cfg->dpad_right = GetPrivateProfileIntW(L"gamepad", L"dpad_right", 'D', filename);
cfg->btn_a = GetPrivateProfileIntW(L"gamepad", L"button_a", 'O', filename);
cfg->btn_b = GetPrivateProfileIntW(L"gamepad", L"button_b", 'K', filename);
cfg->btn_x = GetPrivateProfileIntW(L"gamepad", L"button_x", 'I', filename);
cfg->btn_y = GetPrivateProfileIntW(L"gamepad", L"button_y", 'J', filename);
cfg->trigger_l = GetPrivateProfileIntW(L"gamepad", L"trigger_l", 'Q', filename);
cfg->trigger_r = GetPrivateProfileIntW(L"gamepad", L"trigger_r", 'E', filename);
cfg->btn_start = GetPrivateProfileIntW(L"gamepad", L"button_start", VK_LSHIFT, filename);
}