forked from Hay1tsme/segatools
ekt: fix missing call to y3.close
This commit is contained in:
@ -357,6 +357,9 @@ CALL int* API_Connect(char* szPortName) {
|
|||||||
|
|
||||||
CALL int API_Close(int* hDevice) {
|
CALL int API_Close(int* hDevice) {
|
||||||
dprintf("Y3: %s(%p)\n", __func__, hDevice);
|
dprintf("Y3: %s(%p)\n", __func__, hDevice);
|
||||||
|
|
||||||
|
y3_dll.close();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -381,12 +384,12 @@ CALL uint32_t API_GetFirmName(int* hDevice) {
|
|||||||
|
|
||||||
if (hDevice == Y3_COM_FIELD) {
|
if (hDevice == Y3_COM_FIELD) {
|
||||||
result = convert_string_to_uint(y3_config.firm_name_field);
|
result = convert_string_to_uint(y3_config.firm_name_field);
|
||||||
dprintf("This Y3 device is a FIELD: %s\n", y3_config.firm_name_field);
|
dprintf("Y3: This device is a FIELD: %s\n", y3_config.firm_name_field);
|
||||||
} else if (hDevice == Y3_COM_PRINT) {
|
} else if (hDevice == Y3_COM_PRINT) {
|
||||||
result = convert_string_to_uint(y3_config.firm_name_printer);
|
result = convert_string_to_uint(y3_config.firm_name_printer);
|
||||||
dprintf("This Y3 device is PRINTER: %s\n", y3_config.firm_name_printer);
|
dprintf("Y3: This device is a PRINTER: %s\n", y3_config.firm_name_printer);
|
||||||
} else {
|
} else {
|
||||||
dprintf("This Y3 device is UNKNOWN\n");
|
dprintf("Y3: This device is UNKNOWN\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -398,12 +401,12 @@ CALL uint32_t API_GetTargetCode(int* hDevice) {
|
|||||||
|
|
||||||
if (hDevice == Y3_COM_FIELD) {
|
if (hDevice == Y3_COM_FIELD) {
|
||||||
result = convert_string_to_uint(y3_config.target_code_field);
|
result = convert_string_to_uint(y3_config.target_code_field);
|
||||||
dprintf("This Y3 device is FIELD: %s\n", y3_config.target_code_field);
|
dprintf("Y3: This device is a FIELD: %s\n", y3_config.target_code_field);
|
||||||
} else if (hDevice == Y3_COM_PRINT) {
|
} else if (hDevice == Y3_COM_PRINT) {
|
||||||
result = convert_string_to_uint(y3_config.target_code_printer);
|
result = convert_string_to_uint(y3_config.target_code_printer);
|
||||||
dprintf("This Y3 device is PRINTER: %s\n", y3_config.target_code_printer);
|
dprintf("Y3: This device is a PRINTER: %s\n", y3_config.target_code_printer);
|
||||||
} else {
|
} else {
|
||||||
dprintf("This Y3 device is UNKNOWN\n");
|
dprintf("Y3: This Y3 device is UNKNOWN\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -5,22 +5,13 @@ y3io_lib = static_library(
|
|||||||
implicit_include_directories : false,
|
implicit_include_directories : false,
|
||||||
dependencies : [
|
dependencies : [
|
||||||
capnhook.get_variable('hook_dep'),
|
capnhook.get_variable('hook_dep'),
|
||||||
capnhook.get_variable('hooklib_dep')
|
capnhook.get_variable('hooklib_dep'),
|
||||||
],
|
],
|
||||||
link_with : [
|
link_with : [
|
||||||
util_lib
|
util_lib,
|
||||||
],
|
],
|
||||||
sources : [
|
sources : [
|
||||||
'impl/dummy/y3io.c',
|
'impl/dummy/y3io.c',
|
||||||
'impl/websockets/y3io.c',
|
|
||||||
'impl/websockets/3rdparty/websockets/aw-base64.h',
|
|
||||||
'impl/websockets/3rdparty/websockets/aw-sha1.h',
|
|
||||||
'impl/websockets/3rdparty/websockets/websocket.c',
|
|
||||||
'impl/websockets/3rdparty/websockets/websocket.h',
|
|
||||||
'impl/websockets/3rdparty/cjson/cJSON.c',
|
|
||||||
'impl/websockets/3rdparty/cjson/cJSON.h',
|
|
||||||
'impl/websockets/3rdparty/cjson/cJSON_Utils.c',
|
|
||||||
'impl/websockets/3rdparty/cjson/cJSON_Utils.h',
|
|
||||||
'impl/y3io.h',
|
'impl/y3io.h',
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user