Skip to content

Commit

Permalink
🐛 Fix a bug where the KillProcess config is not read.
Browse files Browse the repository at this point in the history
- Also included config.ini inside repo
  • Loading branch information
oppenheimerbeach committed Aug 15, 2023
1 parent 07c9696 commit 79fe094
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 0 deletions.
99 changes: 99 additions & 0 deletions EXVS2-POC/config.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
[config]
#Serial for dongle
serial = 284311110001
#Pcbid, digits are the last 7 digits from serial
PcbId = ABLN1110001

#Ip address of the machine
IpAddress = 192.168.0.100
Gateway = 192.168.0.1
SubnetMask = 255.255.255.0
DNS = 8.8.8.8
#Router address
TenpoRouter = 192.168.0.1

#Normally don't need to touch
AuthIP = 127.0.0.1
#Card server address, can be ip or domain name (no need for http:// prefix)
Server = 127.0.0.1

#Game mode, 1 for client, 2 for LM, need corresponding serial, 28431111xxxx for LM and 28431411xxxx for client
mode = 2

#Boot the game in windowed mode or not
windowed = true

#Possible Modes for InputMode (refer to bottom of this config for more detailed control info.)
#1. DirectInput
#2. Keyboard
#3. XInput
InputMode = Keyboard

# Region code, refer to https://dash-dash-dash.jp/archives/57210.html for valid values.
Region = 1

# false = Apply patch to fix card scanning disabled after LM closing time, will cause clock misalignment on LM; default = false
UseNormalTimeInLM = false

#Please Refer to mappings from: https://gist.github.com/emilianavt/f4b2d4e221235f55e8e5d3fb8ea769ed
[keybind]
#For InputMode = Keyboard
Up = UpArr
Left = LeftArr
Down = DownArr
Right = RightArr
Button1 = Z
Button2 = X
Button3 = C
Button4 = V

#ArcadeButtons are for DirectInput Joysticks, you can figure out the key (integer) by using JoystickDetection_Release.exe
ArcadeButton1 = 1
ArcadeButton2 = 8
ArcadeButton3 = 16
ArcadeButton4 = 2
ArcadeStartButton = 512

#These Keys will be used only when InputMode = DirectInput
ArcadeCoin = 128
ArcadeTest = 64
ArcadeCard = 32

#These Keys will be used only when InputMode = Keyboard / XInput
#Please Refer to mappings from: https://gist.github.com/emilianavt/f4b2d4e221235f55e8e5d3fb8ea769ed
KillProcess = Esc
Test = F1
Start = 1
Service = F2
Coin = 5

# (acceptable value = 0-15), (default = 16), If you can accurately specify it, we will query for single direct input device only.
DirectInputDeviceId = 16

# Disable keyboard support keybind if false, default true.
UseKeyboardSupportKeyInDirectInput = true


#KEYBOARD CONTROLS
#-In config.ini set - InputMode = Keyboard
#Map your keyboard buttons in config.ini. There’s a link in the config.ini file to each button and what it’s correct code is you need to use, they are case
#sensitive so if it’s in upper case, you need to type it in upper case.
#Mandatory Mappings in Keyboard mode:
#Up, Down, Left, Right, Button1, Button2, Button3, Button4, Test, Start, Service, Coin
#Card Button will be using default P Button

#XINPUT CONTROLLER
#-In config.ini set - InputMode = XInput
#The game supports xinput controllers natively. Make sure gamepad support is turned ON in the test menu. To remap your inputs for a controller in xinput mode, you
#will need to access the server where your card is stored (localhost/index in browser), you can map your controller config where you edit your card. Your controller
#config for xinput mode will be linked to your card, so card scan is required for your mapping in xinput mode to take effect if it’s different from the stock mapping.
#You will need to use Keyboard for Test, Start, Service, Coin, and these will need to be mapped to keyboard buttons in config.ini.
#Card Button will be using default P Button

#DIRECT INPUT
#-In config.ini set
#InputMode = DirectInput
#To use Directinput mode you need to disable the gamepad support in the test menu. Use the file JoystickDetection_Release.exe to work out the id’s of the buttons on
#your controller. Start that program and press your buttons, it will show id on the screen. Note them down. You need to set the mappings in config.ini
#ArcadeButton1, ArcadeButton2, ArcadeButton3, ArcadeButton4, ArcadeStartButton. Put the ID of the buttons you want to use next to each one in config.ini in the
#direct input section. (the id you got from JoystickDetection_Release.exe). Make sure you disable game pad in the test menu, it can create dual inputs with some controllers.
3 changes: 3 additions & 0 deletions EXVS2-POC/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ config_struct ReadConfigs(INIReader reader) {
jvs_key_bind key_bind;
std::string keyMapPlaceholder;

keyMapPlaceholder = reader.Get("keybind", "KillProcess", "Esc");
key_bind.KillProcess = findKeyByValue(keyMapPlaceholder);

keyMapPlaceholder = reader.Get("keybind", "Test", "T");
key_bind.Test = findKeyByValue(keyMapPlaceholder);

Expand Down

0 comments on commit 79fe094

Please sign in to comment.