OSDN Git Service
(root)
/
sdl2referencejp
/
sdl2referencejp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9cd00fb
)
SDL_atomic_t サンプルコードを修正 https://wiki.libsdl.org/SDL_atomic_t?action=diff&rev1=3&rev2=4
author
maruhiro
<maruhiro@bridge.ocn.ne.jp>
Tue, 7 May 2019 12:59:40 +0000
(21:59 +0900)
committer
maruhiro
<maruhiro@bridge.ocn.ne.jp>
Tue, 7 May 2019 12:59:40 +0000
(21:59 +0900)
SDL_atomic_t.html
patch
|
blob
|
history
diff --git
a/SDL_atomic_t.html
b/SDL_atomic_t.html
index
eac7e00
..
57fdcd5
100644
(file)
--- a/
SDL_atomic_t.html
+++ b/
SDL_atomic_t.html
@@
-32,7
+32,9
@@
SDL_atomic_t frames;
Uint32 fps_timer_callback(Uint32 interval, void *data)
\r
{
\r
const float f = SDL_AtomicGet(&frames);
\r
- const float iv = (float)interval / 1000.0f;
\r
+ const float iv = interval * 0.001f;
\r
+
\r
+ /*
\92
\8d
\88
Ó: printf
\82
ª
\83
X
\83
\8c
\83
b
\83
h
\83
Z
\81
[
\83
t
\82
Å
\82
\82
é
\82
©
\82
Í
\8a
Â
\8b
«
\82
É
\88
Ë
\91
¶
\82
·
\82
é */
\r
printf("%.2f\tfps\n", f / iv);
\r
\r
/*
\83
t
\83
\8c
\81
[
\83
\80
\83
J
\83
E
\83
\93
\83
^
\82
ð
\83
\8a
\83
Z
\83
b
\83
g
\82
·
\82
é */
\r