bananatools/taikoio/config.c

27 lines
1.3 KiB
C

#include <windows.h>
#include <assert.h>
#include <stddef.h>
#include <stdio.h>
#include "taikoio/config.h"
void taiko_io_config_load(struct taiko_input_config *cfg, const wchar_t *filename)
{
cfg->test = GetPrivateProfileIntW(L"usio", L"test", VK_HOME, filename);
cfg->service = GetPrivateProfileIntW(L"usio", L"service", VK_DELETE, filename);
cfg->coin = GetPrivateProfileIntW(L"usio", L"coin", VK_INSERT, filename);
cfg->up = GetPrivateProfileIntW(L"usio", L"up", VK_UP, filename);
cfg->down = GetPrivateProfileIntW(L"usio", L"down", VK_DOWN, filename);
cfg->enter = GetPrivateProfileIntW(L"usio", L"enter", VK_RETURN, filename);
cfg->p1_rim_l = GetPrivateProfileIntW(L"drum", L"p1_rim_l", 'Z', filename);
cfg->p1_center_l = GetPrivateProfileIntW(L"drum", L"p1_center_l", 'X', filename);
cfg->p1_center_r = GetPrivateProfileIntW(L"drum", L"p1_center_r", 'C', filename);
cfg->p1_rim_r = GetPrivateProfileIntW(L"drum", L"p1_rim_r", 'V', filename);
cfg->p2_rim_l = GetPrivateProfileIntW(L"drum", L"p2_rim_l", 'U', filename);
cfg->p2_center_l = GetPrivateProfileIntW(L"drum", L"p2_center_l", 'I', filename);
cfg->p2_center_r = GetPrivateProfileIntW(L"drum", L"p2_center_r", 'O', filename);
cfg->p2_rim_r = GetPrivateProfileIntW(L"drum", L"p2_rim_r", 'P', filename);
}