345 Commits

Author SHA1 Message Date
Eric Warmenhoven
b1503c6fc0 Add accelerometer and gyroscope sensors to iOS 2023-05-21 23:18:34 +02:00
Eric Warmenhoven
3b4acbe5fa Also handle tap events on tvOS 2023-05-12 04:42:20 +02:00
Eric Warmenhoven
7242600a0b Back up retroarch.cfg to NSUserDefaults on tvOS. 2023-05-12 04:42:20 +02:00
Eric Warmenhoven
dda7776252 tvOS Siri remote handling
It's not really usable as a game controller, but it is good for going
through the menu as a simple LRUD.

This also adds better support for names of mFI controllers, as well as
being able to do the expected tvOS behavior of "backing out" of the app.
2023-05-10 08:41:09 +02:00
libretroadmin
6728d5a2fa (Subsystem) Cleanups 2023-02-19 12:15:45 +01:00
warmenhoven
c242586ea7
tvOS improvements (#14983)
The initial popup screen advertising the web server did not prevent
keys from passing through, so interactions with the alert would also
be handled by the menu. The alert would pop up any time there was a
network reconfiguration; now it only pops up once per run. Added a way
to turn off the webserver advertisement alert permanently.

Also fixed a bug around filtering the Siri remote out, and turning
controllers off while the app is running.
2023-02-15 11:59:06 +01:00
warmenhoven
ac2cceb905
Fix a few mac windowed mode settings (#14942)
* Use "Remember window position and size" setting (fixes #14806)
* Implement window opacity
* Enable "Show window decorations" toggle
* Hide "Disable composition" option (osx does not support disabling composition)
2023-02-03 07:32:30 +01:00
warmenhoven
4d5bea1208
Vulkan video driver on iOS (#14902) 2023-01-25 16:17:01 +01:00
reallibretroadmin
3ae8e35d0e (iOS) Buildfix and cleanup some unused variables 2023-01-09 01:54:45 +01:00
libretroadmin
daa9e352cc Remove asserts 2023-01-09 00:51:05 +01:00
libretroadmin
7aab4e3d71 Move apple_view_type to apple_platform.h 2023-01-05 19:35:15 +01:00
Eric Warmenhoven
860ffb2b6a Fix for fullscreen GL driver in Metal OSX build
After calling enterFullScreenMode on the GL view, it becomes the "key"
window, meaning it gets all of the input. This is problematic as that
view doesn't forward the input on to the input driver.
2023-01-05 01:21:15 +01:00
libretroadmin
7dfaae58f9 (UI) Cleanups; style nits 2022-11-23 05:08:15 +01:00
Richard
c0926ad1a1
feat(iOS13): Pointer Movement Accuracy (#14641)
Co-authored-by: Richard <rf2222222@github.com>
2022-11-18 19:45:36 +01:00
LibretroAdmin
46c2a9b950 (Cocoa) small style nits; don't use NSLog 2022-10-26 17:36:58 +02:00
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 18a6880900637cac7ebd26ca810c2b9f2382a5db.
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