Skip to content

Commit 3d9c36f

Browse files
authored
Fix Windows Compile Errors (#111)
* Replace Deprecated Handle::weak_from_u128(u128) is now deprecated for weak_handle(). * Fix Typo Allow shadplay to build on Windows devices
1 parent 9aea1ad commit 3d9c36f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/shader_utils/common.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
//! Bundles in our shader functions/consts etc declared in `shader_utils/common.wgsl` to make them importable.
22
use bevy::{
3-
asset::load_internal_asset,
3+
asset::{load_internal_asset, weak_handle},
44
prelude::{App, Handle, Plugin, Shader},
55
};
66

77
pub struct ShadplayShaderLibrary;
88

99
pub const SHADPLAY_SHADER_LIBRARY_HANDLE: Handle<Shader> =
10-
Handle::weak_from_u128(16813517719070609599);
10+
weak_handle!("1d4373c8-5cfe-4779-9e71-f268b2e43fa9");
1111

1212
impl Plugin for ShadplayShaderLibrary {
1313
fn build(&self, app: &mut App) {

src/utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ pub fn toggle_window_passthrough(
242242
keyboard_input: Res<ButtonInput<KeyCode>>,
243243
mut windows: Query<&mut Window>,
244244
) {
245-
if input.just_pressed(KeyCode::KeyX) {
245+
if keyboard_input.just_pressed(KeyCode::KeyX) {
246246
let mut window = match windows.single_mut() {
247247
Ok(w) => w,
248248
Err(e) => {

0 commit comments

Comments
 (0)