Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
rzerres
orbclient
Commits
07c4ae3f
Verified
Commit
07c4ae3f
authored
Mar 15, 2019
by
Jeremy Soller
Browse files
Improve no_std support, update for latest nightly
parent
9df7d2c8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Cargo.toml
View file @
07c4ae3f
[package]
name
=
"orbclient"
version
=
"0.3.2
0
"
version
=
"0.3.2
1
"
authors
=
[
"Jeremy Soller <jackpot51@gmail.com>"
]
description
=
"The Orbital Client Library"
documentation
=
"https://docs.rs/orbclient"
...
...
@@ -20,7 +20,7 @@ no_std = []
[lib]
name
=
"orbclient"
path
=
"src/lib.rs"
[target.'cfg(all(not(feature
=
"no_std"
)
,
not(target_os
=
"redox"
)))
'.dependencies]
[target.'cfg(all(not(feature
=
"no_std"
)
,
any(unix
,
windows
)))
'.dependencies]
sdl2
=
"0.31.0"
[target.'cfg(all(not(feature
=
"no_std"
)
,
target_os
=
"redox"
))
'.dependencies]
redox_syscall
=
"0.1.43"
LICENSE
View file @
07c4ae3f
The MIT License (MIT)
Copyright (c) 2015 Jeremy Soller
Copyright (c) 2015
-2019
Jeremy Soller
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
...
...
@@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
src/lib.rs
View file @
07c4ae3f
...
...
@@ -46,6 +46,6 @@ pub enum Mode {
#[path
=
"sys/orbital.rs"
]
mod
sys
;
#[cfg(all(not(feature
=
"no_std"
),
not(target_os
=
"redox"
)))]
#[cfg(all(not(feature
=
"no_std"
),
any(unix,
windows
)))]
#[path
=
"sys/sdl2.rs"
]
mod
sys
;
src/sys/sdl2.rs
View file @
07c4ae3f
extern
crate
sdl2
;
use
std
::
cell
::
Cell
;
use
std
::
sync
::
atomic
::{
AtomicUsize
,
Ordering
,
ATOMIC_USIZE_INIT
};
use
std
::
sync
::
atomic
::{
AtomicUsize
,
Ordering
};
use
std
::{
mem
,
ptr
,
slice
};
use
color
::
Color
;
...
...
@@ -10,7 +10,7 @@ use renderer::Renderer;
use
Mode
;
use
WindowFlag
;
static
SDL_USAGES
:
AtomicUsize
=
A
TOMIC_USIZE_INIT
;
static
SDL_USAGES
:
AtomicUsize
=
A
tomicUsize
::
new
(
0
)
;
/// SDL2 Context
static
mut
SDL_CTX
:
*
mut
sdl2
::
Sdl
=
ptr
::
null_mut
();
/// Video Context
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment