mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
more changes to work on ARM
This commit is contained in:
@@ -2,8 +2,13 @@ Client = { }
|
||||
|
||||
-- TODO: load and save configurations
|
||||
function Client.init()
|
||||
g_window.move({ x=220, y=220 })
|
||||
g_window.resize({ width=800, height=480 })
|
||||
-- initialize in fullscreen mode on mobile devices
|
||||
if g_window.getPlatformType() == "X11-EGL" then
|
||||
g_window:setFullscreen()
|
||||
else
|
||||
g_window.move({ x=220, y=220 })
|
||||
g_window.resize({ width=800, height=480 })
|
||||
end
|
||||
g_window.setTitle('OTClient')
|
||||
g_window.setIcon('clienticon.png')
|
||||
return true
|
||||
|
@@ -32,25 +32,10 @@ function createEnvironment()
|
||||
return env
|
||||
end
|
||||
|
||||
function getCallingScriptSourcePath(depth)
|
||||
depth = depth or 2
|
||||
local info = debug.getinfo(1+depth, "Sn")
|
||||
local path
|
||||
if info.short_src then
|
||||
path = info.short_src:match("(.*)/.*")
|
||||
end
|
||||
if not path then
|
||||
path = '/'
|
||||
elseif path:sub(0, 1) ~= '/' then
|
||||
path = '/' .. path
|
||||
end
|
||||
return path
|
||||
end
|
||||
|
||||
function resolveFileFullPath(filePath, depth)
|
||||
depth = depth or 1
|
||||
if filePath:sub(0, 1) ~= '/' then
|
||||
return getCallingScriptSourcePath(depth+1) .. '/' .. filePath
|
||||
return getCurrentSourcePath(depth+1) .. '/' .. filePath
|
||||
else
|
||||
return filePath
|
||||
end
|
||||
|
Reference in New Issue
Block a user