Compare commits

...

5 Commits

Author SHA1 Message Date
AnnoyingRains
3dc32ed3ae Merge branch 'StardustXR:dev' into dev 2025-08-31 02:18:41 +10:00
Schmarni
01ec90c699 fix(hexagon_launcher): use the proper resource init function
Signed-off-by: Schmarni <marnistromer@gmail.com>
2025-08-30 18:15:47 +02:00
Schmarni
e60463081e Revert "fix hexagon_launcher crashing (#8)"
This reverts commit 62b0fe8240.
This fix only stopped hexagon_launcher from exiting properly upon
receiving a fatal error
2025-08-30 18:09:23 +02:00
AnnoyingRains
cbd99c2cc7 fix: nix 2025-08-31 01:40:41 +10:00
Leah Anderson
62b0fe8240 fix hexagon_launcher crashing (#8) 2025-07-05 13:38:39 -07:00
3 changed files with 15 additions and 24 deletions

17
flake.lock generated
View File

@@ -1,17 +1,12 @@
{
"nodes": {
"crane": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1712681629,
"narHash": "sha256-bMDXn4AkTXLCpoZbII6pDGoSeSe9gI87jxPsHRXgu/E=",
"lastModified": 1755993354,
"narHash": "sha256-FCRRAzSaL/+umLIm3RU3O/+fJ2ssaPHseI2SSFL8yZU=",
"owner": "ipetkov",
"repo": "crane",
"rev": "220387ac8e99cbee0ca4c95b621c4bc782b6a235",
"rev": "25bd41b24426c7734278c2ff02e53258851db914",
"type": "github"
},
"original": {
@@ -22,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1712791164,
"narHash": "sha256-3sbWO1mbpWsLepZGbWaMovSO7ndZeFqDSdX0hZ9nVyw=",
"lastModified": 1756386758,
"narHash": "sha256-1wxxznpW2CKvI9VdniaUnTT2Os6rdRJcRUf65ZK9OtE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1042fd8b148a9105f3c0aca3a6177fd1d9360ba5",
"rev": "dfb2f12e899db4876308eba6d93455ab7da304cd",
"type": "github"
},
"original": {

View File

@@ -2,7 +2,6 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
crane = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:ipetkov/crane";
};
};
@@ -13,9 +12,9 @@
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
in {
packages = forAllSystems (system: let pkgs = nixpkgsFor.${system}; in {
default = crane.lib.${system}.buildPackage {
pname = "protostar";
packages = forAllSystems (system: let pkgs = nixpkgsFor.${system}; craneLib = crane.mkLib pkgs; in {
default = craneLib.buildPackage {
pname = "hexagon-launcher";
version = "0.1.0";
src = ./.;

View File

@@ -5,24 +5,24 @@ use app::App;
use color_eyre::eyre::Result;
use glam::Quat;
use hex::{HEX_CENTER, HEX_DIRECTION_VECTORS};
use manifest_dir_macros::directory_relative_path;
use protostar::xdg::{get_desktop_files, parse_desktop_file, DesktopFile};
use protostar::xdg::{DesktopFile, get_desktop_files, parse_desktop_file};
use serde::{Deserialize, Serialize};
use stardust_xr_fusion::{
ClientHandle,
client::Client,
core::values::{
color::{color_space::LinearRgb, rgba_linear, Rgba},
ResourceID,
color::{Rgba, color_space::LinearRgb, rgba_linear},
},
drawable::{MaterialParameter, Model, ModelPartAspect},
node::NodeError,
project_local_resources,
root::{ClientState, FrameInfo, RootAspect, RootEvent},
spatial::{Spatial, SpatialAspect, Transform},
ClientHandle,
};
use stardust_xr_molecules::{
button::{Button, ButtonSettings},
FrameSensitive, Grabbable, GrabbableSettings, PointerMode, UIElement,
button::{Button, ButtonSettings},
};
use std::{f32::consts::PI, sync::Arc, time::Duration};
@@ -43,12 +43,9 @@ async fn main() -> Result<()> {
.pretty()
.init();
let owned_client = Client::connect().await?;
owned_client.setup_resources(&[&project_local_resources!("../res")])?;
let client = owned_client.handle();
let async_loop = owned_client.async_event_loop();
client
.get_root()
.set_base_prefixes(&[directory_relative_path!("../res").to_string()])
.unwrap();
let mut grid = AppHexGrid::new(&client).await;
let mut owned_client = async_loop.stop().await.unwrap();
let event_loop = owned_client.sync_event_loop(|handle, _| {