mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
[win32] Do not create the timer queue, when delete-timer-queue
Earlier the queue was created and a few moments later deleted.
This commit is contained in:
parent
b5c52cfddd
commit
59dbacee14
@ -52,6 +52,7 @@
|
||||
#include "intl/libintl.h"
|
||||
#include "main/select.h"
|
||||
#include "osdep/newwin.h"
|
||||
#include "osdep/osdep.h"
|
||||
#include "osdep/sysname.h"
|
||||
#include "protocol/http/http.h"
|
||||
#include "protocol/uri.h"
|
||||
@ -180,6 +181,11 @@ quickjs_init(struct module *module)
|
||||
quickjs_runtime = JS_NewRuntime();
|
||||
#endif
|
||||
map_interp = interp_new_map();
|
||||
#ifdef CONFIG_OS_WIN32
|
||||
if (!get_cmd_opt_bool("delete-timer-queue")) {
|
||||
create_timer_queue();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -156,12 +156,6 @@ init(void)
|
||||
init_modules(main_modules);
|
||||
|
||||
init_options();
|
||||
|
||||
#if defined(CONFIG_OS_WIN32) && defined(CONFIG_QUICKJS)
|
||||
if (get_cmd_opt_bool("delete-timer-queue")) {
|
||||
delete_timer_queue();
|
||||
}
|
||||
#endif
|
||||
init_static_version();
|
||||
|
||||
register_modules_options(main_modules);
|
||||
|
@ -80,19 +80,21 @@ init_osdep(void)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_QUICKJS
|
||||
void
|
||||
create_timer_queue(void)
|
||||
{
|
||||
hTimerQueue = CreateTimerQueue();
|
||||
|
||||
if (hTimerQueue != NULL) {
|
||||
(void)CreateTimerQueueTimer(&hTimer, hTimerQueue,
|
||||
(WAITORTIMERCALLBACK)TimerRoutine, NULL , 1000, 1000, 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_QUICKJS
|
||||
void
|
||||
static void
|
||||
delete_timer_queue(void)
|
||||
{
|
||||
if (hTimerQueue) {
|
||||
|
@ -20,7 +20,7 @@ char *user_appdata_directory(void);
|
||||
#define user_appdata_directory user_appdata_directory
|
||||
|
||||
#ifdef CONFIG_QUICKJS
|
||||
void delete_timer_queue();
|
||||
void create_timer_queue(void);
|
||||
#endif
|
||||
|
||||
/* Stub functions: */
|
||||
|
Loading…
x
Reference in New Issue
Block a user