v2.3.0: removed unnecessary cursor allocation attempts on mobile

This commit is contained in:
Evan Debenham
2023-12-19 13:01:08 -05:00
parent be29c81ef3
commit e37ab84b2d

View File

@@ -26,6 +26,7 @@ import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Pixmap;
import com.watabou.input.ControllerHandler;
import com.watabou.noosa.Game;
import com.watabou.utils.DeviceCompat;
import com.watabou.utils.FileUtils;
import com.watabou.utils.PointF;
@@ -52,6 +53,11 @@ public class Cursor {
public static void setCustomCursor(Type type, int zoom){
//custom cursors (i.e. images which replace the mouse icon) are only supported on desktop
if (!DeviceCompat.isDesktop()){
return;
}
if (currentCursor != null){
if (lastType == type && lastZoom == zoom){
return;