mirror of
https://github.com/encounter/SDL.git
synced 2025-12-09 21:47:44 +00:00
Use SDL's stdinc functions instead of C runtime calls.
This commit is contained in:
@@ -342,7 +342,7 @@ SetXRandRDisplayName(Display *dpy, Atom EDID, char *name, const size_t namelen,
|
||||
X11_XFree(props);
|
||||
}
|
||||
|
||||
inches = (int)((SDL_sqrt(widthmm * widthmm + heightmm * heightmm) / 25.4f) + 0.5f);
|
||||
inches = (int)((SDL_sqrtf(widthmm * widthmm + heightmm * heightmm) / 25.4f) + 0.5f);
|
||||
if (*name && inches) {
|
||||
const size_t len = SDL_strlen(name);
|
||||
SDL_snprintf(&name[len], namelen-len, " %d\"", inches);
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
*/
|
||||
|
||||
/* Author: Soren Sandmann <sandmann@redhat.com> */
|
||||
#include "../../SDL_internal.h"
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "edid.h"
|
||||
#include <stdlib.h>
|
||||
@@ -247,7 +249,7 @@ decode_fraction (int high, int low)
|
||||
high = (high << 2) | low;
|
||||
|
||||
for (i = 0; i < 10; ++i)
|
||||
result += get_bit (high, i) * pow (2, i - 10);
|
||||
result += get_bit (high, i) * SDL_pow (2, i - 10);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user