Skip to content
Closed
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions examples/colored-tri/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![no_std]
#![feature(start)]

use core::mem::ManuallyDrop;

Expand All @@ -15,8 +14,8 @@ use ogc_rs::{

extern crate alloc;

#[start]
fn main(_argc: isize, _argv: *const *const u8) -> isize {
#[no_mqngle]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#[no_mqngle]?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah, thanks, got it wrong.

pub extern "C" fn main(_argc: isize, _argv: *const *const u8) -> isize {
let vi = Video::init();
let mut config = Video::get_preferred_mode();

Expand Down
5 changes: 2 additions & 3 deletions examples/embedded-graphics-wii/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![no_std]
#![feature(start)]

mod display;
use crate::display::Display;
Expand All @@ -15,8 +14,8 @@ use embedded_graphics::{

use ogc_rs::prelude::*;

#[start]
fn main(_argc: isize, _argv: *const *const u8) -> isize {
#[no_mqngle]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

pub extern "C" fn main(_argc: isize, _argv: *const *const u8) -> isize {
let mut video = Video::init();
Input::init(ControllerType::Gamecube);
Input::init(ControllerType::Wii);
Expand Down
5 changes: 2 additions & 3 deletions examples/ios/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![no_std]
#![feature(start)]

use alloc::vec;
use ogc_rs::{
Expand All @@ -9,8 +8,8 @@ use ogc_rs::{

extern crate alloc;

#[start]
fn main(_argc: isize, _argv: *const *const u8) -> isize {
#[no_mangle]
pub extern "C" fn main(_argc: isize, _argv: *const *const u8) -> isize {
// Try to open SYSCONF
if let Ok(fd) = ios::open(c"/shared2/sys/SYSCONF", Mode::Read) {
// Try to grab size or default to 0;
Expand Down
5 changes: 2 additions & 3 deletions examples/obj-loading/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![no_std]
#![feature(start)]

mod obj;
use core::f32::consts::PI;
Expand Down Expand Up @@ -28,8 +27,8 @@ const WHITE_BYTES: &[u8] = include_bytes!("../white.png");
#[derive(Clone, Copy)]
pub struct Align32<T>(pub T);

#[start]
fn main(_argc: isize, _argv: *const *const u8) -> isize {
#[no_mangle]
pub extern "C" fn main(_argc: isize, _argv: *const *const u8) -> isize {
let Ok(obj) = obj::from_bytes(include_bytes!("./assets/untitled.obj")) else {
panic!()
};
Expand Down
5 changes: 2 additions & 3 deletions examples/template/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#![no_std]
#![feature(start)]

extern crate alloc;
use core::mem::ManuallyDrop;

use ogc_rs::{mp3player::MP3Player, prelude::*};

#[start]
fn main(_argc: isize, _argv: *const *const u8) -> isize {
#[no_mangle]
pub extern "C" fn main(_argc: isize, _argv: *const *const u8) -> isize {
let mp3 = include_bytes!("../mp3.mp3");

let video = Video::init();
Expand Down
5 changes: 2 additions & 3 deletions examples/texture-tri/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![no_std]
#![feature(start)]

use core::{alloc::Layout, mem::ManuallyDrop};

Expand All @@ -22,8 +21,8 @@ extern crate alloc;
use alloc::vec;
const WHITE_BYTES: &[u8] = include_bytes!("../white.png");

#[start]
fn main(_argc: isize, _argv: *const *const u8) -> isize {
#[no_mangle]
pub extern "C" fn main(_argc: isize, _argv: *const *const u8) -> isize {
let vi = Video::init();
let mut config = Video::get_preferred_mode();

Expand Down
1 change: 1 addition & 0 deletions ogc-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ fn main() {
println!("cargo:rustc-link-lib=static=c");
println!("cargo:rustc-link-lib=static=sysbase");
println!("cargo:rustc-link-lib=static=m");
println!("cargo:rustc-link-lib=static=db");
println!("cargo:rustc-link-lib=static=ogc");
println!("cargo:rustc-link-lib=static=asnd");
println!("cargo:rustc-link-lib=static=mad");
Expand Down
Loading