diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 92aba32..c908bd5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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: - 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 diff --git a/_config.yml b/_config.yml index bad8266..4688e93 100644 --- a/_config.yml +++ b/_config.yml @@ -1 +1,2 @@ +# Configuration for GitHub Pages (Jekyll) theme: jekyll-theme-midnight diff --git a/assets/css/style.scss b/assets/css/style.scss new file mode 100644 index 0000000..1efa0fc --- /dev/null +++ b/assets/css/style.scss @@ -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; +} diff --git a/citro3d/examples/triangle.rs b/citro3d/examples/triangle.rs index b367906..6f3c784 100644 --- a/citro3d/examples/triangle.rs +++ b/citro3d/examples/triangle.rs @@ -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 { 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();