Commit Graph

144 Commits

Author SHA1 Message Date
Nathan Adams 536352a0d3 render: Move wgpu options out from desktop and into wgpu render crate 2020-10-10 13:43:18 -07:00
Mike Welsh b41ea6e2fc chore: Switch from sample to dasp crate
sample renamed into dasp. Switch to this crate and also use the
latest git revision, which fixed some compiler errors on nightly.

Also remove unnecessary sample dependency in exporter Cargo.toml.
2020-10-07 23:19:41 -07:00
Mike Welsh a81f050e14 chore: Bump to winit 0.23 2020-10-04 13:04:27 -07:00
Sean-Thomas 5701312527 desktop: Implement play/pause for CPAL backend
- removed default implementations for `play()` and `pause()` methods for AudioBackend trait
- Implemented `play()` and `pause()` methods for CPAL audio backend
- Implemented empty block for `play()` and `pause()` methods for NULL audio backend
2020-09-29 11:05:23 -07:00
Mike Welsh ead845ff33 chore: Appease clippy 2020-09-26 18:19:37 -07:00
Nathan Adams de009c7673 core: Add Log backend, for capturing trace output specific to a movie 2020-09-13 13:51:39 -07:00
Nathan Adams 0b5713557b desktop: Implement LocaleBackend for desktop 2020-09-02 17:12:31 -07:00
Nathan Adams 86eb6f2e50 avm1: Implement Date - #249 2020-09-02 17:12:31 -07:00
Nathan Adams 932cb750ba desktop: Add help documentation to command line arguments 2020-09-02 12:06:25 -07:00
Nathan Adams 7273c85034 desktop: Add --power (or -p) option for choosing a graphics power preference (high for dedicated gpu, low for integrated, default for situational best) 2020-09-02 12:06:25 -07:00
Nathan Adams 3e09767c7a desktop: Add --graphics (or -g) option for choosing a graphics backend (vulkan/metal/dx12/dx11 right now) 2020-09-02 12:06:25 -07:00
Nathan Adams cb2461920b core: HTTP request values need to preserve order 2020-08-28 11:53:32 -07:00
Mike Welsh 3d17efd941 desktop: Wire up mouse wheel events 2020-08-23 13:38:59 -07:00
Mike Welsh 227ad0dc0a desktop: Fix #1025, invalid audio stream config on ALSA
When using ALSA, cpal was returning bogus sample rates from
`Device::supported_output_configs`, causing the audio stream to
fail to initialize.

Use `Device::default_output_config` instead.
2020-08-21 13:39:42 -07:00
Mike Welsh 88b3d35e27 chore: Fix ambiguous call in audio
Nightly was complaining because `array.map` may be added in future
Rust versions.
2020-08-14 14:25:02 -07:00
Mike Welsh 1a267cfa85 core: Add git revision to version info 2020-08-14 14:12:08 -07:00
Mike Welsh e49332c43c desktop: Switch to clap 3.0.0-beta1
Prepare for next major release of clap.
Dump structopt, which has been merged into clap.
2020-08-14 14:12:08 -07:00
David Wendt c926da8888 Refactor URL relativization into two utility methods that backends can provide base URLs and paths to. 2020-07-23 23:02:54 -04:00
David Wendt 7433bfe28f Add a `NavigatorBackend` method to resolve relative URLs. 2020-07-23 23:02:53 -04:00
David Wendt f56d16a68d Separate player creation from root movie setup, and allow users of Ruffle to load in movies synchronously or asynchronously.
During the small period of time when a player is created but has no root movie, a temporary empty movie is installed with an assumed stage size and framerate of 550x400@12fps. This is Flash default for new projects, so it seemed appropriate. User ActionScript cannot see these values, and I'm not even sure JavaScript can, either.
2020-07-23 23:02:51 -04:00
Mike Welsh ef67f828fb desktop: Revert to console app on Win32
Remove #![windows_subsystem = "windows"], which launched us as a
GUI app on win32. However, this had the side effect of hiding
output to stdout/stderr when launched from the command-line.

Since Ruffle is primarily a CLI interface as of yet, let's revert
back to a console win32 app so that we can display output. Instead,
we can hide the console if we detect we were not launched from the
command line.
2020-07-20 23:11:44 -07:00
Mike Welsh 7b0a4a5838 chore: Bump to cpal 0.12 2020-07-10 17:17:11 -07:00
CUB3D f03093528c core: Add shared object cache and saving on exit
On the desktop player, shared objects will now be flushed on quit.
Attempting to retrieve an existing shared object will now return a
reference to the existing one.
2020-06-24 01:46:42 +01:00
CUB3D 166cb60d89 chore: Clean up useage of unwrap 2020-06-24 01:46:07 +01:00
CUB3D fce8e8b7de chore: Fix build 2020-06-24 01:46:07 +01:00
CUB3D f2a5f4fd8e chore: Fix clippy lints and format 2020-06-24 01:46:07 +01:00
CUB3D 8822f03fba desktop: Scope storage to the specific swf being executed 2020-06-24 01:46:07 +01:00
CUB3D 8e28bab159 chore: Fix clippy lints, refactor storage to use data_local_dir 2020-06-24 01:46:07 +01:00
CUB3D 1b130ccd47 chore: Refactor storage access 2020-06-24 01:46:06 +01:00
CUB3D 4e286b43ae chore: Format 2020-06-24 01:46:06 +01:00
CUB3D 752ffc5cca chore: Fix clippy lints and tests 2020-06-24 01:44:07 +01:00
CUB3D c630e93c87 desktop: Add a disk based implementation of StorageBackend 2020-06-24 01:43:25 +01:00
Nathan Adams 59ccd75518 core: Rename loader::LoaderError to loader::Error 2020-06-20 15:02:00 -07:00
Nathan Adams 0f1eef9022 core: Introduce LoaderError to all Loader methods 2020-06-20 15:02:00 -07:00
Nathan Adams 5662b2d4d9 core: Make Value::coerce_to_string return a Cow<str>` 2020-06-19 12:48:28 -07:00
Mike Welsh 83feeefeeb audio: Don't panic on unimplemented codecs
Remove `unimplemented` calls when encountring unsupported codecs
such as Nellymoser. Instead, return an Error that can be
gracefully handled.
2020-06-17 12:14:08 -07:00
CUB3D a62b3e0b7f desktop: Removed clear_clipboard impl 2020-06-09 22:41:11 +01:00
CUB3D c5cdd6a1ad desktop: Add clipboard support to desktop player 2020-06-09 22:41:11 +01:00
Genna Wingert 8cb1ad7757 desktop: Use compressed favicon.ico 2020-06-09 10:26:06 -07:00
Genna Wingert 9e38c4188b Add window icon stored as embedded RGBA data.
Add embedded binary icon on Windows only.
2020-06-09 10:26:06 -07:00
Genna Wingert b63ab89dc2
desktop: Do not show Windows console window when running Ruffle (merge #691)
No longer show a command line window when opening a file with ruffle via a file association (open with).

Co-authored-by: Genna Wingert <wingertge@gmail.com>
2020-06-08 12:32:58 -07:00
Mike Welsh f034471e2e desktop: Set viewport dimensions based on physical size
When creating the viewport on desktop, the window DPI was not taken
into account, which may result in a blank screen until resized
(reported in #548). The window dimensions are now converted to
physical coordinates before passing them to the renderer.
2020-05-12 00:24:38 -07:00
Nathan Adams 84b274618e render: Made wgpu renderer agnostic to if it's going to a window, prep for output-to-buffer 2020-05-11 01:09:07 -07:00
Nathan Adams 47a44a5fe8 desktop: Prime window with known width/height of the movie 2020-05-04 16:07:38 -07:00
Nathan Adams 51d9f3ef36 core: Change Player::new to take in a SwfMovie, not &[u8] 2020-05-04 16:07:38 -07:00
Mike Welsh f09bd8c079 core: Clean up tick/render loop
Don't call `render` from `Player::tick`; instead, require the
frontends to explicitly call `render` when they wish to redraw.
The frontend can query `Player::needs_render` to see if the stage
is dirty and needs a redraw. Update desktop and web to use this
new method.

This fits better with the newer winit event loop model, which
requires explicitly calling `request_redraw`, and should avoid
spurious renders.
2020-05-02 04:25:21 -07:00
Mike Welsh beb0eba3a3 chore: WGPURenderBackend -> WgpuRenderBackend 2020-04-30 20:00:07 -07:00
Nathan Adams c2290ed5ef render: Remove dependency on winit from wgpu renderer 2020-04-30 08:48:33 +02:00
Nathan Adams f0445d94b8 render: Add wgpu-rs based renderer, used by desktop 2020-04-30 08:48:33 +02:00
Mike Welsh 6fb0046bd3 render: Move Glium renderer to separate subcrate 2020-04-29 23:26:41 -07:00