Browse Source

Try a different theme and fix build failure

pull/31/head
Ian Chamberlain 6 months ago
parent
commit
30c0c72086
No known key found for this signature in database
GPG Key ID: AE5484D09405AA60
  1. 7
      .github/workflows/docs.yml
  2. 1
      _config.yml
  3. 15
      assets/css/style.scss
  4. 4
      citro3d/examples/triangle.rs

7
.github/workflows/docs.yml

@ -16,14 +16,9 @@ jobs: @@ -16,14 +16,9 @@ jobs:
- name: Setup Pages
uses: actions/configure-pages@v3
with:
generator_config_file: ./_site/_config.yml
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
- uses: rust3ds/test-runner/setup@v1
with:
@ -31,6 +26,8 @@ jobs: @@ -31,6 +26,8 @@ jobs:
- name: Build workspace docs
run: cargo 3ds --verbose doc --verbose --no-deps --workspace
env:
RUSTDOCFLAGS: --enable-index-page
# https://github.com/actions/upload-pages-artifact#file-permissions
- name: Fix file permissions

1
_config.yml

@ -1 +1,2 @@ @@ -1 +1,2 @@
# Configuration for GitHub Pages (Jekyll)
theme: jekyll-theme-midnight

15
assets/css/style.scss

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
---
---
// https://github.com/pages-themes/midnight#stylesheet
@import "{{ site.theme }}";
// Give code links a color that matches regular links
a code {
color: inherit;
}
// Remove weird extra padding and spaces from inline code blocks
code {
padding: 0;
}

4
citro3d/examples/triangle.rs

@ -49,8 +49,6 @@ static VERTICES: &[Vertex] = &[ @@ -49,8 +49,6 @@ static VERTICES: &[Vertex] = &[
static SHADER_BYTES: &[u8] = include_shader!("assets/vshader.pica");
fn main() {
ctru::use_panic_handler();
let mut soc = Soc::new().expect("failed to get SOC");
drop(soc.redirect_to_3dslink(true, true));
@ -166,7 +164,7 @@ struct Projections { @@ -166,7 +164,7 @@ struct Projections {
fn calculate_projections() -> Projections {
// TODO: it would be cool to allow playing around with these parameters on
// the fly with D-pad, etc.
let slider_val = unsafe { ctru_sys::osGet3DSliderState() };
let slider_val = ctru::os::current_3d_slider_state();
let interocular_distance = slider_val / 2.0;
let vertical_fov = 40.0_f32.to_radians();

Loading…
Cancel
Save