From c1892d26192f5561630c0fe114945798f5320eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Fern=C3=A1ndez?= <975883+pazos@users.noreply.github.com> Date: Fri, 14 May 2021 13:31:24 +0200 Subject: [PATCH] [chore] Move SDL check to the end of Device's probe function (#7682) To avoid a few log lines on all platforms: ``` ffi.load: SDL2 ffi.load (warning): libSDL2.so: cannot open shared object file: No such file or directory ffi.load: libSDL2-2.0.so ffi.load (warning): libSDL2-2.0.so: cannot open shared object file: No such file or directory ffi.load: libSDL2-2.0.so.0 ffi.load (warning): libSDL2-2.0.so.0: cannot open shared object file: No such file or directory ``` --- frontend/device.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/frontend/device.lua b/frontend/device.lua index ddbd4e758..f9184fb93 100644 --- a/frontend/device.lua +++ b/frontend/device.lua @@ -2,10 +2,6 @@ local isAndroid, _ = pcall(require, "android") local util = require("ffi/util") local function probeDevice() - if util.isSDL() then - return require("device/sdl/device") - end - if isAndroid then return require("device/android/device") end @@ -40,6 +36,9 @@ local function probeDevice() if cervantes_test_stat then return require("device/cervantes/device") end + if util.isSDL() then + return require("device/sdl/device") + end -- add new ports here: --