|
|
@@ -8,7 +8,7 @@ bool IZ_MIDIInputIsValidChannel(u8 value) { |
|
|
|
|
|
|
|
void IZ_MIDIInputSerializeControl(i32 value, char* control[128]) { |
|
|
|
const char* serialized = IZ_MIDIGetNoteName(value); |
|
|
|
memcpy_s(control, 128, serialized, 128); |
|
|
|
memcpy(control, serialized, 128); |
|
|
|
} |
|
|
|
|
|
|
|
i32 IZ_MIDIInputDeserializeControl(const char* control) { |
|
|
@@ -77,7 +77,7 @@ void IZ_MIDIInputInitializeConfigItems(IZ_ConfigItem config_items[]) { |
|
|
|
char* control_mapping_section_name; |
|
|
|
for (player_index = 0; player_index < IZ_PLAYERS; player_index += 1) { |
|
|
|
main_section_name = SDL_malloc(sizeof(char) * 64); |
|
|
|
sprintf_s(main_section_name, 64, "MIDIInput.%d", player_index); |
|
|
|
sprintf(main_section_name, "MIDIInput.%d", player_index); |
|
|
|
|
|
|
|
u16 base_index = (player_index * (IZ_CONTROLS + 2)); |
|
|
|
config_items[base_index] = (IZ_ConfigItem) { |
|
|
@@ -111,7 +111,7 @@ void IZ_MIDIInputInitializeConfigItems(IZ_ConfigItem config_items[]) { |
|
|
|
}; |
|
|
|
|
|
|
|
control_mapping_section_name = SDL_malloc(sizeof(char) * 64); |
|
|
|
sprintf_s(control_mapping_section_name, 64, "MIDIInput.%d.ControlMapping", player_index); |
|
|
|
sprintf(control_mapping_section_name, "MIDIInput.%d.ControlMapping", player_index); |
|
|
|
for (control_index = 0; control_index < IZ_CONTROLS; control_index += 1) { |
|
|
|
config_items[base_index + 2 + control_index] = (IZ_ConfigItem) { |
|
|
|
IZ_CONFIG_TYPE_U8, |
|
|
|