Commit Graph

380 Commits

Author SHA1 Message Date
Sergei Trofimovich f5ee9e74ba
ui/drivers/cocoa: fix -fno-common build (#14204)
`llvm-11` changed the default from `-fcommon` to `-fno-common`:
  https://reviews.llvm.org/D75056

As a result build fails as:

    LD retroarch
    duplicate symbol '_apple_platform' in:
        obj-unix/release/ui/drivers/ui_cocoa.o
        obj-unix/release/ui/drivers/cocoa/cocoa_common.o
    duplicate symbol '_apple_platform' in:
        obj-unix/release/ui/drivers/ui_cocoa.o
        obj-unix/release/gfx/drivers_context/cocoa_gl_ctx.o
    ld: 2 duplicate symbols for architecture x86_64

The change moves `apple_platform` definition from `apple_platform.h`
to `cocoa_common.m` leaving only declaration in `apple_platform.h`.
2022-07-23 10:24:46 +02:00
twinaphex 95fad4d32c Cleanups 2022-04-13 15:08:22 +02:00
yoshisuga 01cb10d8b3
[iOS 13+] Support a toolbar that allows toggling of onscreen keyboard and touch mouse (#13700)
* Fetch translations from Crowdin

* Support for showing and hiding indicator and navigation bar

* Refactored to use a view model

* Support defining helper bar items and support showing/hiding keyboard

* reorganized source files into separate logical files

* Moved mouse support to swift (except for delegate implementation), added support for enabling touch mouse in helper bar; reorganized swift source files

* Reorganized keyboard files; added the touch mouse messages to the RA localization files; use the RA notification system

* change keyboard letters to uppercase for clarity

Co-authored-by: github-actions <github-actions@github.com>
2022-03-07 19:09:49 +01:00
yoshisuga bc02f8319e
[iOS] New iOS 13 project to support Swift; Custom keyboard and touch mouse support (#13435)
* Support for Swift, added emulator keyboard

* fixed toggle key handling using magic number hack for now

* fixed keyboard transparency slider for now with suboptimal fix; add gesture recognizer to hide/show keyboard

* Support CocoaView extensions in Swift; move keyboard delegate impl and setup to swift extension

* moved keyboard view model creation out of EmulatorKeyboard

* implement key pressed delegate in swift extension

* added input method for directly sending RETROK_* codes to support a touchscreen keyboard; assign keyboard model delegates; updated keyboard layout (added F1-F12 keys); change shift, control and alt keys to be modifiers

* enable focus mode when custom keyboard is shown; enable/disable overlay when custom keyboard is toggled

* Specify -DHAVE_OPENGLES2 instead of -DHAVE_OPENGLES3 since glsym_es3.h does not compile in iOS 14.5
Fix tvOS build using compiler flags

* Create new project for iOS 13 deploy target; add check for deploy target to conditionally compile for new iOS 13 specific feature (custom keyboard)

* force disable core info caching for iOS, use opengl es2 for debug

* Add flag for iOS custom keyboard - 3-finger swipe up to show, 3-finger swipe down to hide

* use OpenGLES2 instead; using ES3 results in compile time errors on iOS 14.5

* code cleanup

* Updated references to -DDONT_WANT_ARM_ASM_OPTIMIZATIONS flag

* Add JIT support for non-jailbroken devices

* iOS: Add support for touch mouse handler

* Added a HAVE_IOS_TOUCHMOUSE preprocessor macro so that it builds under the iOS11_Metal xcode project

* Changed click-and-drag behavior to double tap hold and drag

* Visual improvements to the emulator keyboard: updated colors, improved key-press effect
2022-02-22 08:21:34 +01:00
Vladimir Serbinenko 4e24fb3d01
Add osx-ppc compilation for frontend (#13532)
* Fix old osx condition

Current code assumes that osx < 10.12 is equivalent to ppc osx. It's not
true as Leopard x86 is still < 10.12 but not ppc. As xcode compiles fat
binaries it includes osx x86 and compilation fails.

* Disable crtswitchres when no c++11 is available

Crtswitchres altually needs c++11. Since it's not that important to make
it compatible with lower c++, just disable if no c++11 is available

* Don't use firstObject on old Mac OS X.

It was introduced in 10.6, so on old ones just implement it ourselves

* Compile osx-ppc frontend

* osx-ppc: Build a fat binary

On 10.6 i386 xcode apparently refuses to build a pure ppc.
Settle for a fat binary.
2022-01-24 16:22:07 +01:00
twinaphex 0b16a64d40 Remove unused variables 2021-11-05 22:42:09 +01:00
twinaphex 18412e34c1 Some CXX_BUILD buildfixes for Mac 2021-11-05 02:16:40 +01:00
twinaphex ee77cd7288 Move cocoa_defines.h to defines/ 2021-03-08 03:58:41 +01:00
twinaphex 01c163a2fa (Cocoa) Combine Cocoa files into one 2021-03-08 00:28:21 +01:00
twinaphex dbbf557954 (Metal/WindowListener) Fix duplicate symbol errors by
moving implementation of WindowListener to cocoa_common.m
2021-01-24 03:56:17 +01:00
Autechre 7ea1d7d0da
Revert "Mac buildfixes (#11933)" (#11934)
This reverts commit 18a6880900.
2021-01-24 03:56:05 +01:00
Autechre 18a6880900
Mac buildfixes (#11933)
* (Metal/WindowListener) Fix duplicate symbol errors by
moving implementation of WindowListener to cocoa_common.m

* (Apple) Cleanup some conditionals

* (Cocoa) Cut down on OSX ifdefs in Cocoa-specific code
2021-01-24 03:53:10 +01:00
Autechre a49b02c44b
(Mac) Makefile changes for supporting Metal build (#11929)
* (QB) Add rule for Metal - define HAVE_COCOA_METAL for now
when building for Metal, and HAVE_COCOA for non-Metal build

* Make necessary changes to Makefile.common and qb/config.libs.sh:
- Disable OpenGL for now for Metal build
- Take Metal conditional out of OpenGL block in Makefile.common

* (Metal) Header fixes for compiling without Xcode/Griffin

* (Mac) Some buildfixes for non-Xcode building

* (cocoa_common.h) Restructure to no longer use -DOSX

* (Apple) More buildfixes

* (Apple) Cleanups
2021-01-22 22:20:38 +01:00
Autechre 746101010f
(Apple/Clang/ARC) ARC (Automatic Reference Counting) only available (#11920)
since Clang. PowerPC Mac is stuck with GCC and predates the use of ARC,
__has_feature() also is a Clang extension, so wrap around this with a
conditional so that GCC PowerPC on Mac can still work
2021-01-21 08:53:16 +01:00
Autechre 18170486cd
Update cocoa_common.m 2021-01-19 04:51:38 +01:00
Twinaphex a83c328631 (Metal) Fix some build problems 2021-01-19 04:38:07 +01:00
Twinaphex 97d954912d (Apple) Buildfix 2021-01-18 21:21:17 +01:00
twinaphex 0294b0c626 (Cocoa) Don't use NSEventModifierFlags type anymore - just
use NSUInteger instead
2021-01-18 20:41:30 +01:00
twinaphex 8d31c410a0 move cocoa_get_metrics to cocoa_common.m 2021-01-18 19:33:06 +01:00
twinaphex a80a64f261 Add cocoa_update_title to cocoa_common.m 2021-01-18 19:28:36 +01:00
Twinaphex 3d17cf1e38 Move nsview_set/get/cocoaview_get to cocoa_common.m 2021-01-18 19:17:12 +01:00
Twinaphex eea07ea367 (COcoa GL/Cocoa Common) Refactor code for eventual splitting up
of cocoa_gl_ctx.m into two files
2021-01-18 15:41:30 +01:00
twinaphex f6d35ee462 (iOS) Cleanups 2021-01-18 03:03:35 +01:00
twinaphex 1e9f6f175e (OSX) Fix PowerPC build 2021-01-17 05:02:07 +01:00
Twinaphex f6833cf595 Remove unused variables 2021-01-17 00:12:29 +01:00
twinaphex 93b1fbbcdc (Apple) Header cleanups 2021-01-17 00:06:33 +01:00
twinaphex 225b851eb6 Cleanups 2021-01-16 22:04:11 +01:00
Twinaphex 1d4ff9bedd Take out HAVE_MENU ifdef in cocoa_common.h 2021-01-16 21:47:14 +01:00
twinaphex 757ea32782 Go back to CocoaView pointer in prototype 2021-01-16 20:37:56 +01:00
twinaphex 4e74a6f8b1 Attempt to fix build for iOS 2021-01-16 17:02:25 +01:00
Autechre 7b90da4af7
Update cocoa_common.m 2020-12-28 07:52:08 +01:00
twinaphex 9ddc39af59 Buildfix 2020-12-27 20:01:41 +01:00
twinaphex f65ecf24f1 Go back to ObjC file 2020-12-27 16:49:05 +01:00
twinaphex 899ad1cf88 Buildfix for OSX 2020-10-01 17:22:00 +02:00
Twinaphex 0651185ea3 Cleanups 2020-09-17 21:57:35 +02:00
Twinaphex 4c1c0cc80d webServerDidCompleteBonjourRegistration - cleanup some code
duplication
2020-09-16 10:12:43 +02:00
Twinaphex f8b4477b9a (Cocoa) Cleanups; group things together under TARGET_OSX and TARGET_IOS 2020-09-16 10:09:03 +02:00
Twinaphex 86c0ffaf39 (Cocoa) Cleanups 2020-09-15 20:50:20 +02:00
twinaphex ddfbd38610 Cleanups 2020-09-15 20:40:24 +02:00
twinaphex c9938eb316 Cleanups 2020-09-15 19:48:43 +02:00
Twinaphex cec774ba3b RAMenuBase can be removed now 2020-09-15 19:36:40 +02:00
twinaphex 9245e3bd6b Cleanups 2020-09-15 19:30:44 +02:00
twinaphex 91205d17f6 Cut down on else codeblock here - it's identical 2020-09-15 18:59:45 +02:00
Twinaphex 88e927cf94 Convert ui_cocoa_application.m to C 2020-09-14 17:12:57 +02:00
Twinaphex a8beb91f0f Reimplement ui_application_cocoa_process_event 2020-09-14 16:50:26 +02:00
Twinaphex b1723f7cd0 Remove unused CocoaTouch menu - allows us to get rid of a lot of
dead code
2020-08-09 19:41:04 +02:00
Yoshi Sugawara 4456efa6c8 [iOS] Hide the home indicator as it obscures the content too frequently 2020-08-05 15:43:04 -10:00
Yoshi Sugawara 2187cf67c9 Support the ApplePlatform delegate for all iOS builds (the OpenGL one) so that the view initialization happens in the same way; remove the companion UI for iOS; four finger swipe down now shows RA menu on iOS 2020-07-20 15:38:24 -10:00
Yoshi Sugawara 6692a8797f added comments on why native companion menu is disabled 2020-07-19 08:04:17 -10:00
Yoshi Sugawara 42e4854245 replaced confusing ifdef with a more concise #if TARGET_OS_OSX 2020-07-19 07:57:10 -10:00
Yoshi Sugawara eed84b3021 re-created RetroArch_iOS11_Metal.xcodeproj with the appropriate compiler flags and fixed building for both metal and opengl; hardcoding the metal drawable size for now for testing 2020-07-18 07:47:10 -10:00
Yoshi Sugawara 82d6d8e876 add the metal view to the view controller view after initializing the metal view for iOS 2020-07-07 08:19:46 -10:00
Yoshi Sugawara 6308ba1acb support ApplePlatform for iOS and conform app delegate class to it, move app delegate class to apple_platform.h, fix metal references for iOS 2020-07-07 05:03:42 -10:00
twinaphex d15942f6c8 Cleanups 2020-06-07 20:55:27 +02:00
twinaphex 0ef1b342e4 settings Cleanups 2020-03-02 20:10:24 +01:00
twinaphex 0ae51061f6 Fix build 2020-02-26 22:00:59 +01:00
twinaphex f5bc061b26 Merge menu_generic.c into menu_driver.c 2020-02-26 09:22:48 +01:00
twinaphex f785e4b045 Replace while (1) with for (;;) - avoids MSVC warnings 2020-01-30 16:15:52 +01:00
Jean-André Santoni c0dfcd2adf
Fix Metal build 2019-11-30 12:49:52 +07:00
Twinaphex 932071952d (OSX) Buildfix 2019-11-20 11:19:18 +01:00
twinaphex 861379d8e3 Revert code in hopes iOS works again 2019-11-20 06:25:40 +01:00
Twinaphex d2d240ecf5 (iOS) Should fix iOS build problems 2019-11-20 02:58:17 +01:00
Twinaphex 540edd7b5d (iOS) Buildfix #1 2019-11-20 02:51:18 +01:00
twinaphex e3506ed06b Move nsview_get_ptr to cocoa_common 2019-11-20 02:24:03 +01:00
Twinaphex bac58c99c4 Buildfix 2019-11-20 02:24:03 +01:00
twinaphex 964fcda79a Move glkitview_init to cocoa_common.m 2019-11-20 02:24:02 +01:00
Jean-André Santoni 947e15f34f
Move WindowListener around 2019-11-19 12:00:24 +07:00
Twinaphex c7ce2c7053 Fix Xcode issue 2019-11-19 05:54:01 +01:00
jdgleaver 7eefec6945 (GLUI) Navigation improvements 2019-11-15 14:53:00 +00:00
Yoshi Sugawara 2b415292c6 iOS: #9562: wrap call to get app delegate around a gcd main thread async call 2019-10-06 09:41:53 -10:00
Twinaphex f0bfdbf209 Add header to prevent build failures 2019-10-06 03:43:49 +02:00
twinaphex 4cf27651ba (Cocoa defines) Guarantee backwards compatibility 2019-10-05 18:58:15 +02:00
Twinaphex 511f43d5cf Move it to cocoa_gl_ctx.m 2019-09-22 11:26:06 +02:00
Twinaphex a6ec5a9831 Should now work 2019-09-22 11:19:54 +02:00
Twinaphex 6fe4559b8e Revert "(Cocoa) See if this works"
This reverts commit 1ddd7ee79d.
2019-09-22 10:54:11 +02:00
Twinaphex 83f1b28f98 Revert "(Cocoa) Move nsview_get_ptr and nsview_set_ptr to cocoa_gl_ctx.m"
This reverts commit 4f564360e7.
2019-09-22 10:54:01 +02:00
twinaphex 4f564360e7 (Cocoa) Move nsview_get_ptr and nsview_set_ptr to cocoa_gl_ctx.m 2019-09-22 10:48:23 +02:00
twinaphex 1ddd7ee79d (Cocoa) See if this works 2019-09-22 10:43:31 +02:00
twinaphex ad1fb29092 (Metal) Refactor 2019-09-22 10:28:51 +02:00
Twinaphex 6a9feb7978 (OSX) Refactor this so that we always set the userdata
pointer so we can use the new set_title codepaths - will
have to check how to reduce the overhead in nsview_get_ptr
later
2019-09-22 10:19:03 +02:00
Twinaphex 9f0f53b1d7 (OSX) Correct userdata 2019-09-22 08:16:43 +02:00
twinaphex fbb8a9640c (OSX) Set pointer for HAVE_COCOA_METAL too 2019-09-22 08:00:39 +02:00
twinaphex 2135e86fc7 (Cocoa) Set video display driver userdata for Cocoa 2019-09-22 07:49:43 +02:00
Twinaphex 69a38f9b9f (Cocoa) Pass direct pointer to UI companion driver window title function 2019-09-22 07:41:56 +02:00
orbea e13ec54dc6 Fix --disable-overlay. 2019-07-21 10:26:42 -07:00
Twinaphex db6a4f8368 (UI Companion) Get rid of unused iterate function callback 2019-07-19 13:59:07 +02:00
twinaphex 801b0742d8 (UI application) We don't use pending_events - get rid of it 2019-07-17 22:08:11 +02:00
Twinaphex 6abca4c323 Cleanups 2019-07-11 04:31:10 +02:00
twinaphex f6497e8012 ui_application_t - we never use run except for Qt, so remove this
and move the code to frontend.c - also add a boolean variable to
ui_application_t to indicate whether an app is about to exit
2019-07-11 02:18:21 +02:00
Twinaphex e6e4d09c33 (OSX) Silence warning 2019-07-10 05:50:26 +02:00
Twinaphex 5d56302a31
Merge pull request #9033 from yoshisuga/ios_remove_pause_indicator
iOS: remove pause indicator
2019-06-29 12:12:32 +02:00
Twinaphex c8486a5081 (Cocoa/Metal) Silence bunch of warnings 2019-06-24 14:58:32 +02:00
twinaphex d4ea084f3d Add cocoa_defines.h 2019-06-24 14:49:18 +02:00
twinaphex 5db8da3fc8 (Cocoa) Buildfix 2019-06-17 15:19:00 +02:00
twinaphex 3581786708 Merge camera_driver.c with retroarch.c 2019-06-17 11:18:27 +02:00
Yoshi Sugawara 45b36d7d47 iOS: remove pause indicator; show the native UI menu using 4-finger swipe down gesture 2019-06-14 08:35:33 -10:00
twinaphex 474f5ab00a (CocoaTouch Menu) Fix build 2019-05-31 08:25:49 +02:00
jdgleaver ff16fb347a 'menu_entry' optimisations 2019-05-30 10:11:26 +01:00
Chuck Smith ac2c6bdac2 correctly centers screen on iPhone X landscape 2019-05-19 21:11:30 +02:00
neville 7c4329f31d (OSX PPC) Buildfixes 2019-05-06 14:12:25 +02:00