
#ifndef MAP_H_INCLUDED
#define MAP_H_INCLUDED

#include "binding.h"    // joy_binding


void auto_map(uint32_t i);
void unmap(uint32_t i);
int find_and_map_x_y_8(uint32_t i, uint32_t x_type, uint32_t y_type);
int find_and_map_x_y_16(uint32_t i, uint32_t x_type, uint32_t y_type);

// Compute what auto_map(i) would produce right now, as a binding table -
// WITHOUT touching joy_data, the config store, or any other slot. Backs
// Joystick_ReadDefaultBindings (c.binding). Writes up to max entries into out
// and returns the count; *out_stick receives the legacy stick number
// auto_map would assign (best-effort - depends on other slots' mapped_number
// at call time, same caveat a live auto_map already has).
uint32_t binding_compute_auto_map(uint32_t i, joy_binding *out, uint32_t max, int32_t *out_stick);


#endif
