Files
TeamTofuShop_taitools/sivaio/config.c
T
2025-06-07 15:09:37 -04:00

33 lines
1.7 KiB
C

#include <windows.h>
#include <assert.h>
#include <limits.h>
#include <stddef.h>
#include <stdio.h>
#include "sivaio/config.h"
void siva_io_config_load(struct siva_input_config *cfg, const wchar_t *filename)
{
cfg->test = GetPrivateProfileIntW(L"fastio", L"test", VK_HOME, filename);
cfg->service = GetPrivateProfileIntW(L"fastio", L"service", VK_DELETE, filename);
cfg->select = GetPrivateProfileIntW(L"fastio", L"select", VK_END, filename);
cfg->enter = GetPrivateProfileIntW(L"fastio", L"enter", VK_RSHIFT, filename);
cfg->coin = GetPrivateProfileIntW(L"fastio", L"coin", VK_INSERT, filename);
cfg->is_ri = GetPrivateProfileIntW(L"deck", L"input_type", 0, filename); // 0 for KB, 1 for RI
cfg->device_num = GetPrivateProfileIntW(L"deck", L"device_num", UINT_MAX, filename);
cfg->btn_l = GetPrivateProfileIntW(L"deck", L"left_button", 'C', filename);
cfg->btn_r = GetPrivateProfileIntW(L"deck", L"right_button", 'N', filename);
cfg->stick_l_up = GetPrivateProfileIntW(L"deck", L"left_stick_up", 'W', filename);
cfg->stick_l_right = GetPrivateProfileIntW(L"deck", L"left_stick_right", 'D', filename);
cfg->stick_l_down = GetPrivateProfileIntW(L"deck", L"left_stick_down", 'S', filename);
cfg->stick_l_left = GetPrivateProfileIntW(L"deck", L"left_stick_left", 'A', filename);
cfg->stick_r_up = GetPrivateProfileIntW(L"deck", L"right_stick_up", 'I', filename);
cfg->stick_r_right = GetPrivateProfileIntW(L"deck", L"right_stick_right", 'L', filename);
cfg->stick_r_down = GetPrivateProfileIntW(L"deck", L"right_stick_down", 'K', filename);
cfg->stick_r_left = GetPrivateProfileIntW(L"deck", L"right_stick_left", 'J', filename);
}