Fix compilation with DMD v2.112.0
This commit is contained in:
@@ -9,6 +9,7 @@ import std.uni;
|
||||
import std.utf;
|
||||
import std.conv;
|
||||
import std.stdio;
|
||||
import undead.string;
|
||||
static import std.algorithm;
|
||||
struct Trace
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@ import std.stdio;
|
||||
import std.ascii;
|
||||
import std.range;
|
||||
import std.string;
|
||||
import undead.string;
|
||||
import std.algorithm;
|
||||
import otya.smilebasic.error;
|
||||
import otya.smilebasic.type;
|
||||
|
||||
@@ -4,6 +4,7 @@ import derelict.sdl2.image;
|
||||
import derelict.opengl3.gl;
|
||||
import otya.smilebasic.petitcomputer;
|
||||
import std.string;
|
||||
import undead.string;
|
||||
import std.stdio;
|
||||
import std.file;
|
||||
import std.conv;
|
||||
|
||||
@@ -12,6 +12,7 @@ static import std.algorithm;
|
||||
import core.stdc.stdio;
|
||||
import core.sync.mutex;
|
||||
import core.sync.condition;
|
||||
import core.thread;
|
||||
static import core.stdc.string;
|
||||
import otya.smilebasic.sprite;
|
||||
import otya.smilebasic.error;
|
||||
@@ -704,8 +705,8 @@ class PetitComputer
|
||||
return;
|
||||
}
|
||||
import std.algorithm : clamp, min, max;
|
||||
short stickx = SDL_GameControllerGetAxis(controller, x).clamp(-short.max, short.max);
|
||||
short sticky = SDL_GameControllerGetAxis(controller, y).clamp(-short.max, short.max);
|
||||
short stickx = SDL_GameControllerGetAxis(controller, x).clamp(cast(short)-short.max, short.max);
|
||||
short sticky = SDL_GameControllerGetAxis(controller, y).clamp(cast(short)-short.max, short.max);
|
||||
s.internalX = stickx / (short.max / Stick.max);
|
||||
s.internalY = -sticky / (short.max / Stick.max);
|
||||
stick(id, s);
|
||||
|
||||
Reference in New Issue
Block a user