Commit Graph

55 Commits

Author SHA1 Message Date
osy 5f7e11e161 display(visionOS): dynamic resolution from window resize 2024-02-25 00:16:27 -08:00
osy 42d7327d1d display: remove optimization for bypassing scale change
This sometimes doesn't work correctly because we may want to change the
native scaling even when the user scaling is constant. Additionally, the
number of calls to update is not as much as anticipated so the performance
savings is minimal.
2023-10-09 17:19:11 -07:00
osy 856951a30f display(iOS): rename visionOS class in new SDK version 2023-09-01 18:26:27 -07:00
osy b0aabf2fb4 display(iOS): support proper window scaling when resized 2023-08-19 09:04:05 -07:00
osy ae12bd819b display(iOS): removed temporary visionOS replacement display class 2023-08-18 17:04:00 -07:00
osy a388342316 display(iOS): moved instance variables to private properties 2023-08-18 15:32:26 -07:00
osy 37991d246f vm: rewrite UTMVirtualMachine in Swift 2023-06-28 19:45:05 -05:00
osy 46342e6113 patches(iOS): support ignoring indirect touch events
Due to the way prefersPointerLocked works, if the pointer is currently over
a SwiftUI button, it will trigger every time the mouse is clicked. We
swizzle in a new property that allows us to ignore all indirect touch events
when active.

Fixes #4843
2023-04-17 21:02:23 -07:00
osy b911e952bc monitor: refactored UTMQemuManager to UTMQemuMonitor
De-couple the JSON RPC handling from QMP commands.
2023-03-11 19:09:09 -08:00
osy 811f27aa48 display: fix mirroring display to multiple windows 2023-01-01 13:04:21 -08:00
osy 94e5dd8619 CocoaSpice: update to latest commit
This resolves the issue where GRUB renders really slowly in GL mode and also
improves rendering performance of non-GL.
2022-12-30 22:56:24 -08:00
osy 410bd50aa5 preferences: support changing FPS limit 2022-12-27 15:33:14 -08:00
osy 4d5900abc6 display(iOS): enable iPad cursor when paused 2022-09-10 18:32:15 +03:00
osy fccb8e6f15 display(iOS): cleanup notification listeners when changing display 2022-09-10 18:32:15 +03:00
osy 1627154e3d display(iOS): hide home indicator and mouse cursor
Fixes #4390
2022-09-10 18:32:15 +03:00
osy 43557232ff display(iOS): support locking zoom 2022-08-02 22:12:49 -07:00
osy 23209fec39 display(iOS): make renderer a property 2022-08-02 22:01:09 -07:00
osy c0887dae22 display(iOS): use current screen for scaling 2022-08-02 21:45:34 -07:00
osy 48fc5a96b5 display(iOS): proper aspect ratio on external display 2022-08-02 18:21:39 -07:00
osy ccf7fa5628 display(iOS): drawableSize not available on enterLive sometimes 2022-08-01 23:08:06 -07:00
osy 500609df53 display(iOS): make window showing keyboard the key window 2022-07-28 22:59:31 -07:00
osy 7b295d02a7 display(iOS): retain scaling when switching displays
Some weird SwiftUI bug makes it impossible to use a Binding during
updateUIViewController. Also simplify the state storage for origin.
2022-07-28 19:26:49 -07:00
osy 045cc2bbe9 display(iOS): rename VMDisplayView.xib 2022-07-26 18:37:24 -07:00
osy 9814446968 display(iOS): remove legacy USB menu 2022-07-26 14:10:51 -07:00
osy f80002feac display(iOS): refactor VM display window to SwiftUI
In preparation for multiple-display support, the existing view controller is
decoupled from UTMVirtualMachine and UTMSpiceIO and now interfaces solely
with VMDisplayViewControllerDelegate. This allows us to then wrap the VC into
a UIViewControllerRepresentable and isolate much of the state into
VMWindowState (a single window) and VMSessionState (entire VM). Finally, the
loading screens are re-implemented in SwiftUI.
2022-07-24 20:24:34 -07:00
osy ba453e1e88 toolbar(iOS): remove legacy toolbar 2022-07-19 21:15:39 -07:00
osy caf64cbc42 CocoaSpice: update to latest, improve multiple display handling 2022-07-17 18:37:15 -07:00
osy b4a327b490 UTM: use new configuration backend
The old backend was very limiting because of how it wrapped a dictionary into
an Objective-C class. It made working with SwiftUI awkward because of the
nested objects and lack of clean array support. It also makes using Swift
Concurrency difficult.

The new config backend unifies both the Apple and QEMU config formats which
were previously separate. This also allowed for much duplicate code to be
removed (particulary in the FS handling of disk images and load/saving).

A temporary UTMConfigurationWrapper class is implemented to interop with the
Objective-C backend mostly for QEMU support.
2022-07-10 21:20:56 -07:00
osy bdb5cb4ebb config: rename UTMQemuConfiguration -> UTMLegacyQemuConfiguration 2022-05-29 15:06:48 -07:00
osy 2224ffadba CocoaSpice: updated backend 2022-05-27 12:06:29 -07:00
osy 98b988a9a4 display(iOS): move USB redirection logic to base class
Same as with the macOS code.
2022-05-23 17:44:10 -07:00
osy 87edce7058 display: re-introduce option to disable auto-resolution
Resolves #3938
2022-05-01 22:08:44 -07:00
osy 6270c63c9f display(iOS): always set resize button state to zoom out when viewport changes 2022-02-25 19:56:49 -08:00
osy 8aae0370dc display(iOS): fix scale/origin saving
This was broken in the re-factor. We fix the functionality and also
clean up the code and make it so the persistent value is always up to
date.

Fixes #3669
2022-02-24 21:08:53 -08:00
osy 66cdb6ec78 vm: renamed VM operation methods
This provides clarity on the grouping of VM operations as well as make
explicit the "request" versus async calls.
2022-02-20 17:41:50 -08:00
osy 5c8e0df921 vm: refactored to use serialized queue
Additionally expose APIs for Swift 5.5 concurrency support (currently
unused). This should simplify the handling of various interdependent
events that must come together for startVM and other operations. It also
opens the door for future async handling of VM operations when better
support for Cocoa, UIKit, and SwiftUI comes.
2022-02-20 17:41:50 -08:00
osy f942686685 vm: remove redundent state kVMSuspended
We have viewState.suspended
2022-02-20 17:41:50 -08:00
osy 4e275c8898 project: refactored CocoaSpice into package
This gives us a few main advantages:

1. It improves encapsulation and division of responsibility.
2. CocoaSpice can be used in other projects more easily.
3. It lays the foundation for better unit testing of key parts.
4. It cleans up the codebase.

Resolves #2376
2022-02-08 14:41:17 -08:00
osy 1e3691d04a vm: refactor QEMU backend to subclasses 2021-06-30 17:34:42 -05:00
osy 76cab32353 iOS: hide status bar with new toolbar is used 2021-06-22 22:55:26 -05:00
osy 7c01c822ae iOS: implement toolbar actions 2021-06-22 22:36:43 -05:00
osy a558becb5f iOS: integrate new toolbar 2021-06-22 19:49:48 -05:00
osy 9c124840d4 iOS: refactored VMDisplayViewController to Swift 2021-06-22 17:17:23 -05:00
osy 58aa8108b6 Merge branch 'master' into dev 2021-04-26 18:46:19 -07:00
osy 0b7a5e5a4c iOS: fully remove USB support from TCI build 2021-04-26 08:42:44 -07:00
osy d371146206 display: clear cached USB devices on stop 2021-03-20 22:20:57 -07:00
osy c25b3794b6 iOS: implement USB device connection
Resolves #46
2021-03-18 19:11:25 -07:00
osy a29284f1ca CocoaSpice: reworked delegation of SpiceIO
Removed the weird delegate properties and added calls for when
CS objects are created.
2021-03-13 22:22:16 -08:00
osy 23dde8cfaa CocoaSpice: refactor cursor drawing into display
There was a misunderstanding previouly that the input code and
cursor drawing code should reside in the same class. This led to
one CocoaSpice class handling both the SPICE input and cursor
channel. The problem is that SPICE protocol specifies a 1-to-1
mapping of cursor channel and display channel (sharing the same
channel id). To implement support for multiple displays, we
would have to follow this convention.

Additionally, there was some akwardness in forcing CSInput to
comply with the UTMRenderSource protocol because it shared the
viewport size with CSDisplay. "Outside" code would have to
syncronize the display size.

As part of the refactor, we also tried to improve the code style
by first moving as many ivars to properties as possible and by
also renaming some methods and inits.
2021-03-13 13:21:44 -08:00
js_john 954ed169bb iOS: use GCMouse API on iOS 14 and above 2021-03-13 18:02:02 +08:00