notaz.gp2x.de
/
sdl_omap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add touchscreen coordinate translation
[sdl_omap.git]
/
src
/
video
/
omapdss
/
config.c
diff --git
a/src/video/omapdss/config.c
b/src/video/omapdss/config.c
index
adedaef
..
a1eb5fd
100644
(file)
--- a/
src/video/omapdss/config.c
+++ b/
src/video/omapdss/config.c
@@
-13,9
+13,6
@@
#include "omapsdl.h"
#include "omapsdl.h"
-int gcfg_force_vsync;
-int gcfg_force_doublebuf;
-
static char *sskip(char *p)
{
while (*p && isspace(*p))
static char *sskip(char *p)
{
while (*p && isspace(*p))
@@
-52,7
+49,7
@@
static int check_token_eq(char **p_, const char *token)
return ret;
}
return ret;
}
-void omapsdl_config(
void
)
+void omapsdl_config(
struct SDL_PrivateVideoData *pdata
)
{
char buff[256];
FILE *f;
{
char buff[256];
FILE *f;
@@
-87,11
+84,15
@@
void omapsdl_config(void)
continue;
}
else if (check_token_eq(&p, "force_vsync")) {
continue;
}
else if (check_token_eq(&p, "force_vsync")) {
-
gcfg_force_vsync =
strtol(p, NULL, 0);
+
pdata->cfg_force_vsync = !!
strtol(p, NULL, 0);
continue;
}
else if (check_token_eq(&p, "force_doublebuf")) {
continue;
}
else if (check_token_eq(&p, "force_doublebuf")) {
- gcfg_force_doublebuf = strtol(p, NULL, 0);
+ pdata->cfg_force_doublebuf = !!strtol(p, NULL, 0);
+ continue;
+ }
+ else if (check_token_eq(&p, "no_ts_translate")) {
+ pdata->cfg_no_ts_translate = !!strtol(p, NULL, 0);
continue;
}
continue;
}
@@
-101,15
+102,18
@@
bad:
fclose(f);
}
fclose(f);
}
-void omapsdl_config_from_env(
void
)
+void omapsdl_config_from_env(
struct SDL_PrivateVideoData *pdata
)
{
const char *tmp;
tmp = getenv("SDL_OMAP_VSYNC");
if (tmp != NULL)
{
const char *tmp;
tmp = getenv("SDL_OMAP_VSYNC");
if (tmp != NULL)
-
gcfg_force_vsync =
strtol(tmp, NULL, 0);
+
pdata->cfg_force_vsync = !!
strtol(tmp, NULL, 0);
tmp = getenv("SDL_OMAP_FORCE_DOUBLEBUF");
if (tmp != NULL)
tmp = getenv("SDL_OMAP_FORCE_DOUBLEBUF");
if (tmp != NULL)
- gcfg_force_doublebuf = strtol(tmp, NULL, 0);
+ pdata->cfg_force_doublebuf = !!strtol(tmp, NULL, 0);
+ tmp = getenv("SDL_OMAP_NO_TS_TRANSLATE");
+ if (tmp != NULL)
+ pdata->cfg_no_ts_translate = !!strtol(tmp, NULL, 0);
}
}