Release of HID to VPAD 0.9f
Changelog: - Reaaaaaally a lot of things internally. Rewrote the many parts of the controller_patcher engine. - Added a nice GUI! DarkIrata did a great job at creating the graphics. - Finally fixed the DS3 bug in a official build (sorry for the delay) - Controller can also be used to emulate Pro Controller - Input preview/tester - Supporting even more controller via the network client (e.g Xbox 360, Xbox one, the new DS4,Switch Pro Controller etc.). Big shoutout @QuarkTheAwesome who helped me there! - Added support for DS3 Rumble (thanks @skid_au) - GC-Adapter rumble fixed. - Support for all slots of deviced with multiple slots (like https://github.com/Maschell/controller_patcher_configs/blob/master/DualShock2.ini) - Hopefully reduced the random crashes. - Probably some stuff I already forgot.
32
Makefile
@ -32,17 +32,32 @@ TARGET := hidtovpad
|
|||||||
BUILD := build
|
BUILD := build
|
||||||
BUILD_DBG := $(TARGET)_dbg
|
BUILD_DBG := $(TARGET)_dbg
|
||||||
SOURCES := src \
|
SOURCES := src \
|
||||||
src/dynamic_libs \
|
|
||||||
src/controller_patcher \
|
|
||||||
src/game \
|
|
||||||
src/kernel \
|
|
||||||
src/patcher \
|
|
||||||
src/common \
|
src/common \
|
||||||
|
src/controller_patcher \
|
||||||
|
src/controller_patcher/utils \
|
||||||
|
src/controller_patcher/network \
|
||||||
|
src/controller_patcher/patcher \
|
||||||
|
src/controller_patcher/config \
|
||||||
|
src/dynamic_libs \
|
||||||
|
src/fs \
|
||||||
|
src/game \
|
||||||
|
src/gui \
|
||||||
|
src/kernel \
|
||||||
|
src/menu \
|
||||||
|
src/menu/tv \
|
||||||
|
src/menu/drc \
|
||||||
|
src/menu/drc/content \
|
||||||
|
src/patcher \
|
||||||
|
src/resources \
|
||||||
|
src/sounds \
|
||||||
src/system \
|
src/system \
|
||||||
src/utils \
|
src/utils \
|
||||||
src/video \
|
src/video \
|
||||||
src/video/shaders
|
src/video/shaders
|
||||||
DATA :=
|
DATA := data \
|
||||||
|
data/images \
|
||||||
|
data/fonts \
|
||||||
|
data/sounds
|
||||||
|
|
||||||
INCLUDES := src
|
INCLUDES := src
|
||||||
|
|
||||||
@ -62,7 +77,7 @@ MAKEFLAGS += --no-print-directory
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# any extra libraries we wish to link with the project
|
# any extra libraries we wish to link with the project
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
LIBS :=
|
LIBS := -lgcc -lgd -lpng -ljpeg -lz -lfreetype -lmad -lvorbisidec
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# list of directories containing libraries, this must be the top level containing
|
# list of directories containing libraries, this must be the top level containing
|
||||||
@ -88,6 +103,7 @@ export DEPSDIR := $(CURDIR)/$(BUILD)
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# automatically build a list of object files for our project
|
# automatically build a list of object files for our project
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
|
FILELIST := $(shell bash ./filelist.sh)
|
||||||
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
|
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
|
||||||
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
||||||
sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
||||||
|
BIN
data/fonts/font.ttf
Normal file
BIN
data/images/GithubIcon.png
Normal file
After Width: | Height: | Size: 795 B |
BIN
data/images/HomeButtonIcon.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
BIN
data/images/InputGetterBG.png
Normal file
After Width: | Height: | Size: 294 KiB |
BIN
data/images/ItemBackgroundBig.png
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
data/images/ItemBackgroundSmall.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
data/images/MainWindowTVBackground.jpg
Normal file
After Width: | Height: | Size: 92 KiB |
BIN
data/images/MainWindowTVBackgroundBanner.png
Normal file
After Width: | Height: | Size: 144 KiB |
BIN
data/images/PlusButtonIcon.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
data/images/TVElementControllerBG.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
data/images/TVElementControllerBGSelected.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
data/images/TwitterIcon.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
data/images/aboutIcon.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
data/images/buttons_gamepad_a.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
data/images/buttons_gamepad_b.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
data/images/buttons_gamepad_controller.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
data/images/buttons_gamepad_dpad_down.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
data/images/buttons_gamepad_dpad_left.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
data/images/buttons_gamepad_dpad_right.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
data/images/buttons_gamepad_dpad_up.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
data/images/buttons_gamepad_home.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
data/images/buttons_gamepad_l.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
data/images/buttons_gamepad_l_stick.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
data/images/buttons_gamepad_l_stick_down.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
data/images/buttons_gamepad_l_stick_left.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
data/images/buttons_gamepad_l_stick_right.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
data/images/buttons_gamepad_l_stick_up.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
data/images/buttons_gamepad_minus.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
data/images/buttons_gamepad_plus.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
data/images/buttons_gamepad_power.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
data/images/buttons_gamepad_r.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
data/images/buttons_gamepad_r_stick.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
data/images/buttons_gamepad_r_stick_down.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
data/images/buttons_gamepad_r_stick_left.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
data/images/buttons_gamepad_r_stick_right.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
data/images/buttons_gamepad_r_stick_up.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
data/images/buttons_gamepad_tv.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
data/images/buttons_gamepad_x.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
data/images/buttons_gamepad_y.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
data/images/buttons_gamepad_zl.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
data/images/buttons_gamepad_zr.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
data/images/buttons_pro_a.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
data/images/buttons_pro_b.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
data/images/buttons_pro_controller.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
data/images/buttons_pro_dpad_down.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
data/images/buttons_pro_dpad_left.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
data/images/buttons_pro_dpad_right.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
data/images/buttons_pro_dpad_up.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
data/images/buttons_pro_home.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
data/images/buttons_pro_l.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
data/images/buttons_pro_l_stick.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
data/images/buttons_pro_l_stick_down.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
data/images/buttons_pro_l_stick_left.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
data/images/buttons_pro_l_stick_right.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
data/images/buttons_pro_l_stick_up.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
data/images/buttons_pro_minus.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
data/images/buttons_pro_plus.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
data/images/buttons_pro_power.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
data/images/buttons_pro_r.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
data/images/buttons_pro_r_stick.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
data/images/buttons_pro_r_stick_down.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
data/images/buttons_pro_r_stick_left.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
data/images/buttons_pro_r_stick_right.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
data/images/buttons_pro_r_stick_up.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
data/images/buttons_pro_x.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
data/images/buttons_pro_y.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
data/images/buttons_pro_zl.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
data/images/buttons_pro_zr.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
data/images/footer.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
data/images/gamepad.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
data/images/gamepadBig.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
BIN
data/images/gamepadIcon.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
data/images/helpIcon.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
data/images/home.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
data/images/homeIcon.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
data/images/itemIcon.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
data/images/itemIconBig.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
data/images/itemIconBigSelected.png
Normal file
After Width: | Height: | Size: 8.5 KiB |
BIN
data/images/ledoff.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
data/images/ledon.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
data/images/logo.png
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
data/images/netbtn.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
data/images/not_connected.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
data/images/player1_point.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
data/images/player2_point.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
data/images/player3_point.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
data/images/player4_point.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
data/images/proController.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
data/images/proControllerBig.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
data/images/selectorBig.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
data/images/selectorSmall.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
BIN
data/images/seperator.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
data/images/settingButton.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
data/images/settingSelectedButton.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
data/images/twittergithub.png
Normal file
After Width: | Height: | Size: 9.5 KiB |
BIN
data/images/windowSplitter.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
data/sounds/bgMusic.mp3
Normal file
BIN
data/sounds/button_click.mp3
Normal file
83
filelist.sh
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
#
|
||||||
|
# Automatic resource file list generation
|
||||||
|
# Created by Dimok
|
||||||
|
|
||||||
|
outFile="./src/resources/filelist.h"
|
||||||
|
count_old=$(cat $outFile 2>/dev/null | tr -d '\n\n' | sed 's/[^0-9]*\([0-9]*\).*/\1/')
|
||||||
|
|
||||||
|
count=0
|
||||||
|
if [[ $OSTYPE == darwin* ]];
|
||||||
|
then
|
||||||
|
|
||||||
|
for i in $(gfind ./data/images/ ./data/sounds/ ./data/fonts/ -maxdepth 1 -type f \( ! -printf "%f\n" \) | sort -f)
|
||||||
|
do
|
||||||
|
files[count]=$i
|
||||||
|
count=$((count+1))
|
||||||
|
done
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
for i in $(find ./data/images/ ./data/sounds/ ./data/fonts/ -maxdepth 1 -type f \( ! -printf "%f\n" \) | sort -f)
|
||||||
|
do
|
||||||
|
files[count]=$i
|
||||||
|
count=$((count+1))
|
||||||
|
done
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$count_old" != "$count" ] || [ ! -f $outFile ]
|
||||||
|
then
|
||||||
|
|
||||||
|
echo "Generating filelist.h for $count files." >&2
|
||||||
|
cat <<EOF > $outFile
|
||||||
|
/****************************************************************************
|
||||||
|
* Loadiine resource files.
|
||||||
|
* This file is generated automatically.
|
||||||
|
* Includes $count files.
|
||||||
|
*
|
||||||
|
* NOTE:
|
||||||
|
* Any manual modification of this file will be overwriten by the generation.
|
||||||
|
****************************************************************************/
|
||||||
|
#ifndef _FILELIST_H_
|
||||||
|
#define _FILELIST_H_
|
||||||
|
|
||||||
|
#include <gctypes.h>
|
||||||
|
|
||||||
|
typedef struct _RecourceFile
|
||||||
|
{
|
||||||
|
const char *filename;
|
||||||
|
const u8 *DefaultFile;
|
||||||
|
const u32 &DefaultFileSize;
|
||||||
|
u8 *CustomFile;
|
||||||
|
u32 CustomFileSize;
|
||||||
|
} RecourceFile;
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
for i in ${files[@]}
|
||||||
|
do
|
||||||
|
filename=${i%.*}
|
||||||
|
extension=${i##*.}
|
||||||
|
echo 'extern const u8 '$filename'_'$extension'[];' >> $outFile
|
||||||
|
echo 'extern const u32 '$filename'_'$extension'_size;' >> $outFile
|
||||||
|
echo '' >> $outFile
|
||||||
|
done
|
||||||
|
|
||||||
|
echo 'static RecourceFile RecourceList[] =' >> $outFile
|
||||||
|
echo '{' >> $outFile
|
||||||
|
|
||||||
|
for i in ${files[@]}
|
||||||
|
do
|
||||||
|
filename=${i%.*}
|
||||||
|
extension=${i##*.}
|
||||||
|
echo -e '\t{"'$i'", '$filename'_'$extension', '$filename'_'$extension'_size, NULL, 0},' >> $outFile
|
||||||
|
done
|
||||||
|
|
||||||
|
echo -e '\t{NULL, NULL, 0, NULL, 0}' >> $outFile
|
||||||
|
echo '};' >> $outFile
|
||||||
|
|
||||||
|
echo '' >> $outFile
|
||||||
|
echo '#endif' >> $outFile
|
||||||
|
|
||||||
|
fi
|