Files
RetroArch/samples/input/ctr_joypad/Makefile
LibretroAdmin 82d9cdbb32 3DS, Xbox, DOS joypad drivers: a pad is there only on a port that has one
- 3DS: the console's own controls are a pad on port 0, held or not. It
  answered from the buttons held, so an idle 3DS had no pad and while
  anything was held all sixteen ports had one.
- Original Xbox: query_pad, the name and the axis read are bounded by
  the four ports the console has; ports past them read past the
  driver's arrays.
- DOS: the driver reads no pad, so no port has one; it answered yes for
  all sixteen. Its button read fetched the keyboard state for nothing
  and is now the zero it always returned.

samples/input/ctr_joypad and samples/input/dos_joypad are new lanes,
and xdk_joypad checks the ports past the fourth. The 3DS stubs gain
libctru's HID and C-stick declarations, with types.h owning the shared
scalar names.
2026-10-13 22:34:39 +02:00

33 lines
942 B
Makefile

# The 3DS joypad driver, against the tree's 3DS stubs, with
# the HID reads defined by the test, which includes the driver's
# source itself.
TARGET := ctr_joypad_test
RARCH_DIR := ../../..
LIBRETRO_COMM_DIR := $(RARCH_DIR)/libretro-common
CFLAGS += -Wall -std=gnu99 -g1 -O1 -DRARCH_INTERNAL -D_3DS -D__3DS__ -DARM11 \
-I$(RARCH_DIR)/tools/platform_stubs/ctr -I$(RARCH_DIR) -I$(LIBRETRO_COMM_DIR)/include
ifneq ($(SANITIZER),)
CFLAGS := -fsanitize=$(SANITIZER) -fno-omit-frame-pointer $(CFLAGS)
LDFLAGS := -fsanitize=$(SANITIZER) $(LDFLAGS)
endif
ifneq ($(SAN),)
CFLAGS := -fsanitize=$(SAN) -fno-omit-frame-pointer $(CFLAGS)
LDFLAGS := -fsanitize=$(SAN) $(LDFLAGS)
endif
all: $(TARGET)
$(TARGET): ctr_joypad_test.c $(RARCH_DIR)/input/drivers_joypad/ctr_joypad.c
$(CC) $(CFLAGS) -o $@ ctr_joypad_test.c $(LDFLAGS)
check: all
./$(TARGET)
clean:
rm -f $(TARGET) $(TARGET).exe
.PHONY: all check clean