1
0
mirror of synced 2024-11-23 21:40:58 +01:00
bananatools/saoio/config.c
2024-04-22 21:11:03 -04:00

29 lines
1.5 KiB
C

#include <windows.h>
#include <assert.h>
#include <stddef.h>
#include <stdio.h>
#include "saoio/config.h"
void sao_io_config_load(struct sao_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->stick_up = GetPrivateProfileIntW(L"usio", L"stick_up", 'W', filename);
cfg->stick_left = GetPrivateProfileIntW(L"usio", L"stick_left", 'A', filename);
cfg->stick_down = GetPrivateProfileIntW(L"usio", L"stick_down", 'S', filename);
cfg->stick_right = GetPrivateProfileIntW(L"usio", L"stick_right", 'D', filename);
cfg->stick_btn1 = GetPrivateProfileIntW(L"usio", L"stick_btn1", 'R', filename);
cfg->stick_btn2 = GetPrivateProfileIntW(L"usio", L"stick_btn2", 'F', filename);
cfg->stick_btn3 = GetPrivateProfileIntW(L"usio", L"stick_btn3", 'V', filename);
cfg->btn1 = GetPrivateProfileIntW(L"usio", L"btn1", '1', filename);
cfg->btn2 = GetPrivateProfileIntW(L"usio", L"btn2", '2', filename);
cfg->btn3 = GetPrivateProfileIntW(L"usio", L"btn3", '3', filename);
}