Commit Graph

713 Commits

Author SHA1 Message Date
nosamu db252dabc3 desktop: Use consistent wording for removing parameters 2023-07-10 21:25:04 +02:00
nosamu eeca059aeb desktop: Add Letterbox option to Open Advanced dialog 2023-07-10 21:25:04 +02:00
Crowdin Bot 460e176ea9 chore: Update translations from Crowdin 2023-07-10 08:47:20 +02:00
Daniel Jacobs e159ff8b35 desktop: Make Linux font selection work like Windows 2023-07-09 23:48:25 -04:00
nosamu c60742428c desktop: Use suitable CJK fonts for each language on Windows 2023-07-06 21:42:02 +02:00
tinaun 57ede6e1f2 desktop: load cjk fallback fonts using fontdb 2023-07-06 21:42:02 +02:00
Aaron Hill 009fab1889 core: Expose `LoaderInfo.parameters` and fix other properties
When using a 'Loader', properties on the 'contentLoaderInfo' become
set during specific events in the load sequence. In particular,
'LoaderInfo.bytesTotal' becomes available during the first 'progress'
event.

Also, 'LoaderInfo.parameters' is now properly set from the URL query
parameters. In Flash player, this work even with filesystem urls
(e.g. 'file:///some/path/to/file.txt?paramOne=valOne' will load
a file named 'file.txt', setting and expose the parameter 'paramOne'
with value 'valOne' in `LoaderInfo.parameters`). This required some
cleanup to the desktop and test NavigatorBackend impls to strip
out query parameters when loading a parameter from disk.

Previously, we would set `SwfMovie.parameters` manually from the url.
Now, the various `SwfMovie` constructors automatically extract
query parameters from the provided url. Outside of `SwfMovie`,
we only append *extra* parameters (e.g. those set from `flashvars`).

This makes CPMStar ads work, since the loaded SWF needs to access
`LoaderInfo.parameters`
2023-07-05 19:47:16 -04:00
Crowdin Bot 36a950cf1e chore: Update translations from Crowdin 2023-07-05 18:57:39 +02:00
Aaron Hill 2499db4874 desktop: Use Rc and RefCell for non-thread-safe types 2023-07-04 20:50:46 +02:00
Crowdin Bot ad7e73f77b chore: Update translations from Crowdin 2023-07-03 20:38:26 +02:00
renovate[bot] 13b1078142 chore(deps): lock file maintenance rust dependencies 2023-07-03 08:28:13 +03:00
Aaron Hill 2bcfabef53 desktop: Use `SubscriberInitExt::init` to capture `log` output
This method redirects output from the `log` crate to `tracing`,
which lets us get naga/wgpu logs.
2023-07-02 15:38:35 -04:00
Aaron Hill 6e1f00edf2
render: Implement more PixelBender features (#11800) 2023-07-01 13:50:43 -04:00
Nathan Adams 5e608764ec core: Add debug feature to find display objects by mouse 2023-07-01 12:58:32 +02:00
Crowdin Bot 29a5c6a4cd chore: Update translations from Crowdin 2023-07-01 00:47:31 +02:00
Crowdin Bot 1430e98851 chore: Update translations from Crowdin 2023-06-28 23:19:47 +02:00
lvyitian 9f67d3c238 Formatting 2023-06-27 21:37:28 +03:00
lvyitian e43a9fd85f [desktop][chore] Fix incorrect linker arguments on windows when using gnu linker(ld.exe) 2023-06-27 21:37:28 +03:00
renovate[bot] 3057aa59dd chore(deps): lock file maintenance rust dependencies 2023-06-25 21:53:00 -04:00
Crowdin Bot 9e066bc14f chore: Update translations from Crowdin 2023-06-24 19:58:34 +02:00
Crowdin Bot b1149cd267 chore: Update translations from Crowdin 2023-06-23 11:49:47 +02:00
Crowdin Bot e0cc7f1e54 chore: Update translations from Crowdin 2023-06-22 14:38:34 +02:00
Nathan Adams 00e02d1511 core: Add debug window to list known movies 2023-06-21 18:27:12 +02:00
Nathan Adams 647006b8d0 core: Add more avm2 debug info 2023-06-21 18:27:12 +02:00
Nathan Adams b24cc60a5d core: Add swf info to debug menu 2023-06-21 18:27:12 +02:00
Crowdin Bot 67a5a2923f chore: Update translations from Crowdin 2023-06-20 23:52:03 +02:00
TÖRÖK Attila 599488f0d6 cleanup: Rename GlutinAsyncExecutor -> WinitAsyncExecutor.
It should probably have been renamed as part of, or shortly after, f0445d94b
2023-06-18 14:54:07 +02:00
Crowdin Bot 73482c6e72 chore: Update translations from Crowdin 2023-06-18 01:02:34 +02:00
Crowdin Bot ca549e482c chore: Update translations from Crowdin 2023-06-17 19:25:33 +02:00
renovate[bot] 7a21756ddb chore(deps): lock file maintenance rust dependencies 2023-06-17 11:00:52 -05:00
TÖRÖK Attila 12a28b0c5b chore: Bump `tracing-tracy` to version-match `profiling`
This fixes `thread 'main' panicked at 'span! without a running Client'`
when enabling the `tracy` feature.
2023-06-17 12:12:46 +02:00
Aaron Hill 69fce3f7f8
wpgu: Initial implementation of PixelBender shader execution (#11441)
* wpgu: Initial implementation of PixelBender shader execution

The implementation is split across four crates:
* `ruffle_render` now holds the main PixelBender bytecode parsing
   implementation (previously, this was in `ruffle_core`).
* `ruffle_core` holds some helper functions for converting between
   AVM2 `Value`s and the PixelBender vector types.
* `naga-pixelbender` (newly created) constructs a Naga `Module`
  from parsed PixelBender bytecode
* `ruffle_render_wgpu` sets up the render pipeline for the shader
  constructed by `naga-pixelbender`, and actually executes the shader.

The Actionscript-side shader parameters are passed in through uniforms.
This allows us to cache the compiled `naga::Module` and associated
wgpu types inside `ShaderData`, when it's first created. Each invocation
of a `ShaderJob` only needs to create a bind group and render pass.

Limitations:

* Only a few of the PixelBender opcodes are implemented - however, this is
enough to get Stemlands cannon rotation working, as well as a cool
"donut" shader that I found and included as a test.
* PixelBender matrix types are not supported.
* Only BitmapData is supported as an input/output type - Flash Player
  also supports using Vector and ByteArray
* ShaderJob execution is always synchronous.

* Adjust comments

* Address review comments
2023-06-15 22:50:24 +00:00
Crowdin Bot 56a87dec50 chore: Update translations from Crowdin 2023-06-15 13:10:16 +02:00
Aaron Hill cd2c7f6f2f tests: Enable tracing_subscriber in tests
Previously, we weren't displaying any Ruffle logs when running tests.
2023-06-14 17:15:31 -05:00
nosamu 202fe2f1bb core: Add options to set and force the stage alignment 2023-06-14 16:04:14 +02:00
Nathan Adams 0b86c02c5c desktop: Fix interaction between egui and ruffle cursors 2023-06-14 13:43:17 +02:00
Crowdin Bot 942842c47a chore: Update translations from Crowdin 2023-06-14 12:13:18 +02:00
Crowdin Bot 834297f110 chore: Update translations from Crowdin 2023-06-12 12:28:05 +02:00
Moulins da6e2a96bf desktop: properly populate base and proxy URL fields from option struct
Fixes #11461
2023-06-11 12:46:13 -05:00
Crowdin Bot e8925832a1 chore: Update translations from Crowdin 2023-06-10 10:09:19 +02:00
AllinolCP 44ff49aa53
core: Fix status code implementation for AVM1 and implement HTTPStatusEvent.HTTP_STATUS for avm2 (#11360) 2023-06-10 03:06:26 +00:00
renovate[bot] a621472336 chore(deps): lock file maintenance rust dependencies 2023-06-09 20:17:25 +03:00
doomsdayrs 16210cbcf6 desktop: Add reverse engineered logo svg
There was no source file for the various logos.

I used the icon file provided by @nosamu and used existing pngs to recreate the style of the logo.
2023-06-09 18:21:56 +02:00
Nathan Adams 6ec01f3ecb desktop: Add dummy External Interface option 2023-06-09 13:03:46 +02:00
Aaron Hill 66f3198f50 desktop/web: Increase stack size on Windows and wasm
This works around a stack overflow with Bloonts Tower Defense 5,
where we have over 400 stack frames at once due to deep
`construct_frame` recursion in `goto` execution.
2023-06-08 22:17:27 -05:00
Crowdin Bot 650f872b19 chore: Update translations from Crowdin 2023-06-09 01:51:23 +02:00
Moulins fcd9935a81 desktop: Add `File > Reload` menu command
Also remove redundant `has_movie` parameter in `RuffleGui::update`
2023-06-09 00:42:03 +02:00
Moulins c1a3caefea desktop: point `Open Advanced`'s file dialog to the current file's directory 2023-06-09 00:42:03 +02:00
Moulins d7a056df8e desktop: keep options in-sync when using `Open` or drag-and-dropping a file 2023-06-09 00:42:03 +02:00
Moulins ac69926b5e desktop: add `Ctrl+Shift+O` shortcut for `Open Advanced` 2023-06-09 00:42:03 +02:00
Moulins 08fe4a4c94 desktop: Add button to clear all movie params. in `Open Advanced` 2023-06-09 00:42:03 +02:00
Moulins 5e1716d7e8 desktop: remember `Open Advanced` options across movie loads
Makes opening the same movie repeatedly less tedious.

Note that `Open` still ignore this and will use the default options
provided on the command-line.
2023-06-09 00:42:03 +02:00
Crowdin Bot 93f5869005 chore: Update translations from Crowdin 2023-06-08 00:57:49 +02:00
Crowdin Bot 808deaa378 chore: Update translations from Crowdin 2023-06-05 09:00:51 +02:00
renovate[bot] f1fe998869 chore(deps): lock file maintenance rust dependencies 2023-06-04 22:53:18 -05:00
Crowdin Bot 9767ffca96 chore: Update translations from Crowdin 2023-06-03 15:58:24 +02:00
Nathan Adams 16ce9aa437 core: Add debug rects to debugger 2023-06-03 09:11:06 +02:00
Nathan Adams e12e2a2e54 core: Initial Debug UI 2023-06-03 09:11:06 +02:00
Adrian Wielgosik c8fc810fa6 desktop: rewrite AS3 warning popup in egui 2023-05-31 23:21:30 +02:00
Adrian Wielgosik 5d3544ddc7 desktop: Simple hack to stop ignoring egui redraws 2023-05-30 23:55:31 +02:00
Crowdin Bot 6dc3743f4b chore: Update translations from Crowdin 2023-05-30 23:21:28 +02:00
tinaun ff518b9deb use light menus on light theme & detect changes 2023-05-30 23:07:09 +02:00
Adrian Wielgosik 8d6c08df4d Desktop: Stop busy looping when idling 2023-05-29 22:51:40 +02:00
Nathan Adams d99415c644 desktop: Don't use winit workaround for File->Open, to avoid unresponsive ruffle in that case alone 2023-05-29 22:12:56 +02:00
Nathan Adams 59d917b15a desktop: Default open the Advanced Open dialog 2023-05-29 22:12:56 +02:00
Nathan Adams 0c10e2a7b7 desktop: Add advanced open dialog 2023-05-29 22:12:56 +02:00
Nathan Adams 9e9ee361c4 desktop: Pass PlayerOptions when loading swfs, defaulting to the CLI args 2023-05-29 22:12:56 +02:00
Nathan Adams a86aff07a6 desktop: Use new PlayerOptions struct for player building, not CLI args directly 2023-05-29 22:12:56 +02:00
Nathan Adams 558fea2a7c desktop: Add PlayerController:handle_event that also checks for player pause status 2023-05-29 21:23:00 +02:00
Nathan Adams 101277a32b desktop: Add suspend/resume buttons 2023-05-29 21:23:00 +02:00
renovate[bot] 847dece735 chore(deps): lock file maintenance rust dependencies 2023-05-28 23:54:33 -05:00
Aaron Hill 14c6d1d959 avm2: Implement URLRequest.requestHeaders
These are directly set on the underlying navigator's HTTP
request type, and get printed out in our test navigator backend.

No validation of the header names is performed - on web, this will be
enforced by the browser.
2023-05-28 12:07:37 -05:00
Crowdin Bot e98230c988 chore: Update translations from Crowdin 2023-05-27 00:34:44 +02:00
TÖRÖK Attila 6d76e9669c nit: Github -> GitHub 2023-05-25 10:40:47 +02:00
Nathan Adams defe4d8308 desktop: Support dropping swfs onto the player 2023-05-24 23:50:48 +02:00
Nathan Adams 3e35e7887a desktop: Add a few comments about Player related structs 2023-05-24 23:50:48 +02:00
Nathan Adams ce714b92b6 desktop: When git info is unknown, don't show it 2023-05-24 23:50:48 +02:00
Nathan Adams cd54dc3bc7 desktop: Fix crash on minimize 2023-05-24 23:50:48 +02:00
Nathan Adams 8acd3e653a desktop: Use scale factor to determine menu height 2023-05-24 23:50:48 +02:00
Nathan Adams d8bfb003c5 desktop: Switch to egui 0.22.0 2023-05-24 23:50:48 +02:00
Nathan Adams 67370b0ced desktop: Revert attempts to fix x11 crash and stop relying on inner_size 2023-05-24 23:50:48 +02:00
Nathan Adams cb87dfed7f desktop: Move backend code into a backends mod 2023-05-24 23:50:48 +02:00
Nathan Adams 12e2758464 desktop: Localise texts 2023-05-24 23:50:48 +02:00
Nathan Adams 4600dc5c78 desktop: Forcefully update egui screen_rect to attempt to solve x11 crash 2023-05-24 23:50:48 +02:00
Nathan Adams 2ab2faa24d desktop: Don't recreate surface on resize events, but when drawing and the size is different 2023-05-24 23:50:48 +02:00
Nathan Adams 5c22bcddc6 desktop: Add more links to help menu 2023-05-24 23:50:48 +02:00
Nathan Adams 1dbfa19b04 desktop: Configure the surface immediately 2023-05-24 23:50:48 +02:00
Nathan Adams d11df54291 desktop: Hide menu in fullscreen 2023-05-24 23:50:48 +02:00
Nathan Adams ee59bd006b desktop: Add close movie menu item 2023-05-24 23:50:48 +02:00
Nathan Adams 3005158311 desktop: Always show the menu bar 2023-05-24 23:50:48 +02:00
Nathan Adams 7d7edec08c desktop: Add much more info to About dialog 2023-05-24 23:50:48 +02:00
Nathan Adams 01e33d82c9 desktop: Use vergen to get version info 2023-05-24 23:50:48 +02:00
Nathan Adams f6d0fcf822 desktop: Don't allow resizing of about and open-url dialogs 2023-05-24 23:50:48 +02:00
Nathan Adams e97d32dbc7 desktop: Recreate Player for each movie, and don't start with a Player unless a movie has been specified 2023-05-24 23:50:48 +02:00
Nathan Adams df51531de6 desktop: Move Player creation into PlayerController::new 2023-05-24 23:50:48 +02:00
Nathan Adams 6257c1218f desktop: Make PlayerController.get() return an Option, and handle that 2023-05-24 23:50:48 +02:00
Nathan Adams 2de0b5e7e0 desktop: Wrap Player in a new PlayerController 2023-05-24 23:50:48 +02:00
Nathan Adams 419330ecd5 desktop: Import utils nicer in app.rs 2023-05-24 23:50:48 +02:00
Nathan Adams 73b8f80f57 desktop: Move parse_url and pick_file to util.rs 2023-05-24 23:50:48 +02:00
Nathan Adams 34b1c671a8 desktop: Move --timedemo stuff to time_demo.rs 2023-05-24 23:50:48 +02:00