1
0
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:
Witold Filipczyk 2024-12-02 14:31:00 +01:00
parent b5c52cfddd
commit 59dbacee14
4 changed files with 12 additions and 10 deletions

View File

@ -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

View File

@ -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);

View File

@ -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) {

View File

@ -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: */