1
0
mirror of https://github.com/Relintai/sdl2_frt.git synced 2024-12-25 09:17:12 +01:00
sdl2_frt/premake/patches/713.patch
Ryan C. Gordon b72938c861 Windows: Always set the system timer resolution to 1ms by default.
An existing hint lets apps that don't need the timer resolution changed avoid
this, to save battery, etc, but this fixes several problems in timing, audio
callbacks not firing fast enough, etc.

Fixes Bugzilla .
2015-04-20 12:22:44 -04:00

65 lines
2.5 KiB
Diff
Executable File

# HG changeset patch
# User Ben Henning
# Date 1376606083 25200
# Thu Aug 15 15:34:43 2013 -0700
# Node ID 8c9cd352c70012a64779356bff3c81998c3fb6a0
# Parent e8558df4fbdb173a2b9ed0d354d6c3e76b376698
Implemented the option to set custom source trees for Xcode frameworks (links)
using Visual Studio-esque variables, such as "$(SDKROOT)/OpenGLES.framework".
diff --git a/src/actions/xcode/xcode_common.lua b/src/actions/xcode/xcode_common.lua
--- a/src/actions/xcode/xcode_common.lua
+++ b/src/actions/xcode/xcode_common.lua
@@ -318,18 +318,36 @@
local pth, src
if xcode.isframework(node.path) then
--respect user supplied paths
- if string.find(node.path,'/') then
- if string.find(node.path,'^%.')then
+ -- look for special variable-starting paths for different sources
+ local nodePath = node.path
+ local _, matchEnd, variable = string.find(nodePath, "^%$%((.+)%)/")
+ if variable then
+ -- by skipping the last '/' we support the same absolute/relative
+ -- paths as before
+ nodePath = string.sub(nodePath, matchEnd + 1)
+ end
+ if string.find(nodePath,'/') then
+ if string.find(nodePath,'^%.')then
error('relative paths are not currently supported for frameworks')
end
- pth = node.path
+ pth = nodePath
else
- pth = "/System/Library/Frameworks/" .. node.path
+ pth = "/System/Library/Frameworks/" .. nodePath
end
- src = "absolute"
+ -- if it starts with a variable, use that as the src instead
+ if variable then
+ src = variable
+ -- if we are using a different source tree, it has to be relative
+ -- to that source tree, so get rid of any leading '/'
+ if string.find(pth, '^/') then
+ pth = string.sub(pth, 2)
+ end
+ else
+ src = "<absolute>"
+ end
else
-- something else; probably a source code file
- src = "group"
+ src = "<group>"
-- if the parent node is virtual, it won't have a local path
-- of its own; need to use full relative path from project
@@ -340,7 +358,7 @@
end
end
- _p(2,'%s /* %s */ = {isa = PBXFileReference; lastKnownFileType = %s; name = "%s"; path = "%s"; sourceTree = "<%s>"; };',
+ _p(2,'%s /* %s */ = {isa = PBXFileReference; lastKnownFileType = %s; name = "%s"; path = "%s"; sourceTree = "%s"; };',
node.id, node.name, xcode.getfiletype(node), node.name, pth, src)
end
end