Skip to content

Commit 0600f35

Browse files
committed
added type cast
1 parent a3fdb46 commit 0600f35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

LibDmd/Converter/Serum/Serum.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public override void Convert(DmdFrame frame)
154154
_api.Convert(ref _serumFrame);
155155

156156
if (resultAndRotation < 0xfffffffe) {
157-
int rotation = resultAndRotation & 0xffff;
157+
int rotation = (int) (resultAndRotation & 0xffff);
158158
// 0 => no rotation
159159
// 1 - 2048 => time in ms to next rotation, but in dmdext we use a fixed interval of 1ms
160160
if (rotation > 0 && rotation <= 2048) {
@@ -209,7 +209,7 @@ private bool UpdateRotations()
209209
ReadSerumFrame();
210210
_api.UpdateRotations(ref _serumFrame, _rotationPalette, rotation);
211211

212-
int rotation = resultAndRotation & 0xffff;
212+
int rotation = (int) (resultAndRotation & 0xffff);
213213
// 0 => no rotation
214214
// 1 - 2048 => time in ms to next rotation
215215
if (rotation == 0 || rotation > 2048) {

0 commit comments

Comments
 (0)