Skip to content

Commit ea13d0d

Browse files
authored
Merge pull request #73 from FenrirWolf/gx-const-fn
Add const qualifier to ctru-sys gx functions
2 parents ee65d4b + c54cc09 commit ea13d0d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

citro3d-sys/src/gx.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,31 @@
44
use ctru_sys::{GX_TRANSFER_FORMAT, GX_TRANSFER_SCALE};
55

66
#[inline]
7-
pub fn GX_TRANSFER_FLIP_VERT(flip: bool) -> u32 {
7+
pub const fn GX_TRANSFER_FLIP_VERT(flip: bool) -> u32 {
88
flip as u32
99
}
1010

1111
#[inline]
12-
pub fn GX_TRANSFER_OUT_TILED(tiled: bool) -> u32 {
12+
pub const fn GX_TRANSFER_OUT_TILED(tiled: bool) -> u32 {
1313
(tiled as u32) << 1
1414
}
1515

1616
#[inline]
17-
pub fn GX_TRANSFER_RAW_COPY(raw_copy: bool) -> u32 {
17+
pub const fn GX_TRANSFER_RAW_COPY(raw_copy: bool) -> u32 {
1818
(raw_copy as u32) << 3
1919
}
2020

2121
#[inline]
22-
pub fn GX_TRANSFER_IN_FORMAT(format: GX_TRANSFER_FORMAT) -> u32 {
22+
pub const fn GX_TRANSFER_IN_FORMAT(format: GX_TRANSFER_FORMAT) -> u32 {
2323
(format as u32) << 8
2424
}
2525

2626
#[inline]
27-
pub fn GX_TRANSFER_OUT_FORMAT(format: GX_TRANSFER_FORMAT) -> u32 {
27+
pub const fn GX_TRANSFER_OUT_FORMAT(format: GX_TRANSFER_FORMAT) -> u32 {
2828
(format as u32) << 12
2929
}
3030

3131
#[inline]
32-
pub fn GX_TRANSFER_SCALING(scale: GX_TRANSFER_SCALE) -> u32 {
32+
pub const fn GX_TRANSFER_SCALING(scale: GX_TRANSFER_SCALE) -> u32 {
3333
(scale as u32) << 24
3434
}

0 commit comments

Comments
 (0)