* eina: Partial fix for ticket #286.

SVN revision: 41241
This commit is contained in:
Cedric BAIL 2009-07-03 12:39:32 +00:00
parent 0b02e8f8a3
commit dbaeb5eaba
1 changed files with 4 additions and 3 deletions

View File

@ -90,7 +90,7 @@ _eina_counter_time_get(Eina_Nano_Time *tp)
# endif # endif
} }
#else #else
static int EINA_COUNTER_ERROR_WINDOWS = 0; static int EINA_ERROR_COUNTER_WINDOWS = 0;
static LARGE_INTEGER _eina_counter_frequency; static LARGE_INTEGER _eina_counter_frequency;
static inline int static inline int
@ -233,7 +233,7 @@ _eina_counter_asiprintf(char *base, int *position, const char *format, ...)
* *
* This function sets up the error module of Eina and only on Windows, * This function sets up the error module of Eina and only on Windows,
* it initializes the high precision timer. It also registers, only on * it initializes the high precision timer. It also registers, only on
* Windows, the error #EINA_COUNTER_ERROR_WINDOWS. It is also called * Windows, the error #EINA_ERROR_COUNTER_WINDOWS. It is also called
* by eina_init(). It returns 0 on failure, otherwise it returns the * by eina_init(). It returns 0 on failure, otherwise it returns the
* number of times it has already been called. See eina_error_init() * number of times it has already been called. See eina_error_init()
* for the documentation of the initialisation of the dependency * for the documentation of the initialisation of the dependency
@ -259,9 +259,10 @@ eina_counter_init(void)
return 0; return 0;
} }
#ifdef _WIN32 #ifdef _WIN32
EINA_ERROR_COUNTER_WINDOWS = eina_error_msg_register("Change your OS, you moron !");
if (!QueryPerformanceFrequency(&_eina_counter_frequency)) if (!QueryPerformanceFrequency(&_eina_counter_frequency))
{ {
EINA_COUNTER_ERROR_WINDOWS = eina_error_msg_register("Change your OS, you moron !"); eina_error_set(EINA_ERROR_COUNTER_WINDOWS);
eina_error_shutdown(); eina_error_shutdown();
return 0; return 0;
} }