mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 12:51:05 +08:00
Merge branch 'master' of github.com:LaurentGomila/SFML
This commit is contained in:
commit
faf8a233db
@ -562,7 +562,25 @@ NSUInteger keepOnlyMaskFromData(NSUInteger data, NSUInteger mask);
|
||||
// Ignore escape key and non text keycode. (See NSEvent.h)
|
||||
// They produce a sound alert.
|
||||
unichar code = [[ev characters] characterAtIndex:0];
|
||||
if ([ev keyCode] != 0x35 && (code < 0xF700 || code > 0xF8FF)) {
|
||||
unsigned short keycode = [ev keyCode];
|
||||
|
||||
// Backspace and Delete unicode values are badly handled by Apple.
|
||||
// We do a small workaround here :
|
||||
|
||||
// Backspace
|
||||
if (keycode == 0x33) {
|
||||
// Send the correct unicode value (i.e. 8) instead of 127 (which is 'delete')
|
||||
m_requester->textEntered(8);
|
||||
}
|
||||
|
||||
// Delete
|
||||
else if (keycode == 0x75 || keycode == NSDeleteFunctionKey) {
|
||||
// Instead of the value 63272 we send 127.
|
||||
m_requester->textEntered(127);
|
||||
}
|
||||
|
||||
// All other unicode values
|
||||
else if (keycode != 0x35 && (code < 0xF700 || code > 0xF8FF)) {
|
||||
|
||||
// Let's see if its a valid text.
|
||||
NSText* text = [[self window] fieldEditor:YES forObject:self];
|
||||
|
@ -66,14 +66,8 @@ subject to the following restrictions:
|
||||
<dict>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>SFML_LINK_PREFIX</key>
|
||||
<string>$(SFML_LINK_FRAMEWORKS_PREFIX)</string>
|
||||
|
||||
<key>SFML_LINK_SUFFIX</key>
|
||||
<string>$(SFML_LINK_FRAMEWORKS_SUFFIX)</string>
|
||||
|
||||
<key>HEADER_SEARCH_PATHS</key>
|
||||
<string>$(HEADER_SEARCH_PATHS)</string>
|
||||
<key>SFML_BINARY_TYPE</key>
|
||||
<string>FRAMEWORKS</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
@ -85,14 +79,8 @@ subject to the following restrictions:
|
||||
<dict>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>SFML_LINK_PREFIX</key>
|
||||
<string>$(SFML_LINK_DYLIBS_PREFIX)</string>
|
||||
|
||||
<key>SFML_LINK_SUFFIX</key>
|
||||
<string>$(SFML_LINK_DYLIBS_SUFFIX)</string>
|
||||
|
||||
<key>HEADER_SEARCH_PATHS</key>
|
||||
<string>$(HEADER_SEARCH_PATHS) /usr/local/include/</string>
|
||||
<key>SFML_BINARY_TYPE</key>
|
||||
<string>DYLIBS</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
@ -658,6 +646,12 @@ while (window.isOpen())
|
||||
<key>SFML_LINK_FRAMEWORKS_SUFFIX</key>
|
||||
<string></string>
|
||||
|
||||
<key>SFML_LINK_PREFIX</key>
|
||||
<string>$(SFML_LINK_$(SFML_BINARY_TYPE)_PREFIX)</string>
|
||||
|
||||
<key>SFML_LINK_SUFFIX</key>
|
||||
<string>$(SFML_LINK_$(SFML_BINARY_TYPE)_SUFFIX)</string>
|
||||
|
||||
<key>CLANG_ENABLE_OBJC_ARC</key>
|
||||
<string></string>
|
||||
|
||||
@ -666,6 +660,12 @@ while (window.isOpen())
|
||||
|
||||
<key>FRAMEWORK_SEARCH_PATHS</key>
|
||||
<string>$(FRAMEWORK_SEARCH_PATHS) /Library/Frameworks/**</string>
|
||||
|
||||
<key>HEADER_SEARCH_PATHS</key>
|
||||
<string>$(HEADER_SEARCH_PATHS) /usr/local/include/**</string>
|
||||
|
||||
<key>LIBRARY_SEARCH_PATHS</key>
|
||||
<string>$(LIBRARY_SEARCH_PATHS) /usr/local/lib/**</string>
|
||||
</dict>
|
||||
|
||||
<key>Configurations</key>
|
||||
|
@ -66,14 +66,8 @@ subject to the following restrictions:
|
||||
<dict>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>SFML_LINK_PREFIX</key>
|
||||
<string>$(SFML_LINK_FRAMEWORKS_PREFIX)</string>
|
||||
|
||||
<key>SFML_LINK_SUFFIX</key>
|
||||
<string>$(SFML_LINK_FRAMEWORKS_SUFFIX)</string>
|
||||
|
||||
<key>HEADER_SEARCH_PATHS</key>
|
||||
<string>$(HEADER_SEARCH_PATHS)</string>
|
||||
<key>SFML_BINARY_TYPE</key>
|
||||
<string>FRAMEWORKS</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
@ -85,14 +79,8 @@ subject to the following restrictions:
|
||||
<dict>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>SFML_LINK_PREFIX</key>
|
||||
<string>$(SFML_LINK_DYLIBS_PREFIX)</string>
|
||||
|
||||
<key>SFML_LINK_SUFFIX</key>
|
||||
<string>$(SFML_LINK_DYLIBS_SUFFIX)</string>
|
||||
|
||||
<key>HEADER_SEARCH_PATHS</key>
|
||||
<string>$(HEADER_SEARCH_PATHS) /usr/local/include/</string>
|
||||
<key>SFML_BINARY_TYPE</key>
|
||||
<string>DYLIBS</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
@ -655,6 +643,12 @@ while (window.isOpen())
|
||||
<key>SFML_LINK_FRAMEWORKS_SUFFIX</key>
|
||||
<string></string>
|
||||
|
||||
<key>SFML_LINK_PREFIX</key>
|
||||
<string>$(SFML_LINK_$(SFML_BINARY_TYPE)_PREFIX)</string>
|
||||
|
||||
<key>SFML_LINK_SUFFIX</key>
|
||||
<string>$(SFML_LINK_$(SFML_BINARY_TYPE)_SUFFIX)</string>
|
||||
|
||||
<key>CLANG_ENABLE_OBJC_ARC</key>
|
||||
<string></string>
|
||||
|
||||
@ -663,6 +657,12 @@ while (window.isOpen())
|
||||
|
||||
<key>FRAMEWORK_SEARCH_PATHS</key>
|
||||
<string>$(FRAMEWORK_SEARCH_PATHS) /Library/Frameworks/**</string>
|
||||
|
||||
<key>HEADER_SEARCH_PATHS</key>
|
||||
<string>$(HEADER_SEARCH_PATHS) /usr/local/include/**</string>
|
||||
|
||||
<key>LIBRARY_SEARCH_PATHS</key>
|
||||
<string>$(LIBRARY_SEARCH_PATHS) /usr/local/lib/**</string>
|
||||
</dict>
|
||||
|
||||
<key>Configurations</key>
|
||||
|
@ -47,13 +47,18 @@ Question & Answer
|
||||
2. select your project's target on the main area,
|
||||
3. go to the "Build Settings" tab,
|
||||
4. go down to the bottom,
|
||||
5. update SFML_LINK_PREFIX and SFML_LINK_SUFFIX as follow :
|
||||
* if you want to use frameworks, then
|
||||
1. set SFML_LINK_PREFIX to "$(SFML_LINK_FRAMEWORKS_PREFIX)",
|
||||
2. set SFML_LINK_SUFFIX to "$(SFML_LINK_FRAMEWORKS_SUFFIX)"
|
||||
* if you want to use dylibs, then
|
||||
1. set SFML_LINK_PREFIX to "$(SFML_LINK_DYLIBS_PREFIX)",
|
||||
2. set SFML_LINK_SUFFIX to "$(SFML_LINK_DYLIBS_SUFFIX)"
|
||||
5. set SFML_BINARY_TYPE either to "DYLIBS" or "FRAMEWORKS".
|
||||
|
||||
|
||||
* How to use/don't use debug dylibs ?
|
||||
|
||||
You can choose to use or not SFML debug binaries when creating a new project. However, if you have already created your project you can do the following :
|
||||
|
||||
1. select your project from the project navigator panel,
|
||||
2. select your project's target on the main area,
|
||||
3. go to the "Build Settings" tab,
|
||||
4. go down to the bottom,
|
||||
5. set SFML_LINK_DYLIBS_SUFFIX_DEBUG to "-d" to use them or to "" (empty string) to use only release binary.
|
||||
|
||||
|
||||
* I want to use the static version of SFML. Is it possible ?
|
||||
|
Loading…
Reference in New Issue
Block a user