mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-12-22 03:48:21 -06:00
Remove unneded use of nonsendsync
This commit is contained in:
parent
1b096c07ed
commit
db05b0902d
|
@ -1,4 +1,4 @@
|
|||
use shipyard::{AllStoragesView, IntoIter, NonSendSync, Unique, UniqueView, UniqueViewMut, View};
|
||||
use shipyard::{AllStoragesView, IntoIter, Unique, UniqueView, UniqueViewMut, View};
|
||||
use crate::{events::InputDeviceEvent, rendering::Renderer};
|
||||
use winit::{
|
||||
dpi::PhysicalPosition, event::{DeviceEvent, ElementState, RawKeyEvent}, keyboard::{KeyCode, PhysicalKey}, window::CursorGrabMode
|
||||
|
@ -9,7 +9,7 @@ pub struct CursorLock(pub bool);
|
|||
|
||||
pub fn update_cursor_lock_state(
|
||||
lock: UniqueView<CursorLock>,
|
||||
display: NonSendSync<UniqueView<Renderer>>
|
||||
display: UniqueView<Renderer>
|
||||
) {
|
||||
if cfg!(target_os = "android") {
|
||||
return
|
||||
|
@ -41,7 +41,7 @@ pub fn lock_cursor_now(
|
|||
pub fn debug_toggle_lock(
|
||||
mut lock: UniqueViewMut<CursorLock>,
|
||||
device_events: View<InputDeviceEvent>,
|
||||
ren: NonSendSync<UniqueView<Renderer>>,
|
||||
ren: UniqueView<Renderer>,
|
||||
) {
|
||||
for evt in device_events.iter() {
|
||||
if let DeviceEvent::Key(RawKeyEvent {
|
||||
|
|
|
@ -90,7 +90,7 @@ pub fn process_winit_events(world: &mut World, event: &Event<()>) {
|
|||
// mut storages: AllStoragesViewMut,
|
||||
// ) {
|
||||
// let (w, h) = {
|
||||
// let renderer = storages.borrow::<NonSendSync<UniqueView<Renderer>>>().unwrap();
|
||||
// let renderer = storages.borrow::<UniqueView<Renderer>>().unwrap();
|
||||
// (renderer.size().width, renderer.size().height)
|
||||
// };
|
||||
// storages.add_entity((
|
||||
|
|
|
@ -13,7 +13,7 @@ pub struct UiState {
|
|||
pub fn kubi_ui_init(
|
||||
storages: AllStoragesView
|
||||
) {
|
||||
let renderer = storages.borrow::<NonSendSync<UniqueView<Renderer>>>().unwrap();
|
||||
let renderer = storages.borrow::<UniqueView<Renderer>>().unwrap();
|
||||
storages.add_unique_non_send_sync(UiState {
|
||||
hui: UiInstance::new(),
|
||||
renderer: WgpuUiRenderer::new(renderer.device(), renderer.surface_config().format),
|
||||
|
|
|
@ -310,7 +310,7 @@ pub fn kubi_main(
|
|||
|
||||
//Start rendering (maybe use custom views for this?)
|
||||
// let target = {
|
||||
// let renderer = world.borrow::<NonSendSync<UniqueView<Renderer>>>().unwrap();
|
||||
// let renderer = world.borrow::<UniqueView<Renderer>>().unwrap();
|
||||
// renderer.display.draw()
|
||||
// };
|
||||
// world.add_unique_non_send_sync(RenderTarget(target));
|
||||
|
|
|
@ -76,7 +76,7 @@ pub struct UiFontPrefab(pub FontHandle);
|
|||
|
||||
pub fn load_prefabs(
|
||||
storages: AllStoragesView,
|
||||
renderer: NonSendSync<UniqueView<Renderer>>,
|
||||
renderer: UniqueView<Renderer>,
|
||||
mut ui: NonSendSync<UniqueViewMut<UiState>>,
|
||||
assman: UniqueView<AssetManager>
|
||||
) {
|
||||
|
|
|
@ -266,7 +266,7 @@ fn process_completed_tasks(
|
|||
task_manager: UniqueView<ChunkTaskManager>,
|
||||
mut world: UniqueViewMut<ChunkStorage>,
|
||||
mut meshes: NonSendSync<UniqueViewMut<ChunkMeshStorage>>,
|
||||
renderer: NonSendSync<UniqueView<Renderer>>,
|
||||
renderer: UniqueView<Renderer>,
|
||||
state: UniqueView<GameState>,
|
||||
mut queue: UniqueViewMut<BlockUpdateQueue>,
|
||||
) {
|
||||
|
|
Loading…
Reference in a new issue