2023-09-18 10:05:22 +02:00
|
|
|
#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);
|
|
|
|
|
2024-04-23 03:11:03 +02:00
|
|
|
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);
|
2023-09-18 10:05:22 +02:00
|
|
|
|
2024-04-23 03:11:03 +02:00
|
|
|
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);
|
2023-09-18 10:05:22 +02:00
|
|
|
}
|