mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-14 11:15:24 -05:00
Compare commits
3 commits
1b5946f905
...
c4d18d3fc9
Author | SHA1 | Date | |
---|---|---|---|
|
c4d18d3fc9 | ||
|
1107c1e160 | ||
|
8ca227c219 |
1 changed files with 3 additions and 23 deletions
|
@ -861,9 +861,9 @@ class Save
|
|||
switch (inputType)
|
||||
{
|
||||
case Keys:
|
||||
return (playerId == 0) ? data?.options?.controls?.p1.keyboard : data?.options?.controls?.p2.keyboard;
|
||||
return (playerId == 1) ? data?.options?.controls?.p1.keyboard : data?.options?.controls?.p2.keyboard;
|
||||
case Gamepad(_):
|
||||
return (playerId == 0) ? data?.options?.controls?.p1.gamepad : data?.options?.controls?.p2.gamepad;
|
||||
return (playerId == 1) ? data?.options?.controls?.p1.gamepad : data?.options?.controls?.p2.gamepad;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -878,27 +878,7 @@ class Save
|
|||
|
||||
public function setControls(playerId:Int, inputType:Device, controls:SaveControlsData):Void
|
||||
{
|
||||
switch (inputType)
|
||||
{
|
||||
case Keys:
|
||||
if (playerId == 0)
|
||||
{
|
||||
data.options.controls.p1.keyboard = controls;
|
||||
}
|
||||
else
|
||||
{
|
||||
data.options.controls.p2.keyboard = controls;
|
||||
}
|
||||
case Gamepad(_):
|
||||
if (playerId == 0)
|
||||
{
|
||||
data.options.controls.p1.gamepad = controls;
|
||||
}
|
||||
else
|
||||
{
|
||||
data.options.controls.p2.gamepad = controls;
|
||||
}
|
||||
}
|
||||
getControls(playerId, inputType) = controls;
|
||||
|
||||
flush();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue