Support for printer configuration
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
#include FT_FREETYPE_H
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
#include <86box/device.h>
|
||||
#include "cpu.h"
|
||||
#include <86box/machine.h>
|
||||
#include <86box/timer.h>
|
||||
@@ -2096,6 +2097,47 @@ escp_close(void *priv)
|
||||
free(dev);
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
#if 0
|
||||
static const device_config_t lpt_prt_escp_config[] = {
|
||||
{
|
||||
.name = "paper_size",
|
||||
.description = "Paper Size",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = NULL,
|
||||
.default_int = 0,
|
||||
.file_filter = NULL,
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Letter", .value = 0 },
|
||||
{ .description = "A4", .value = 1 },
|
||||
{ .description = "" }
|
||||
},
|
||||
.bios = { { 0 } }
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
#endif
|
||||
// clang-format on
|
||||
|
||||
const device_t prt_escp_device = {
|
||||
.name = "Generic ESC/P Dot-Matrix Printer",
|
||||
.internal_name = "dot_matrix",
|
||||
.flags = DEVICE_LPT,
|
||||
.local = 0,
|
||||
.init = NULL,
|
||||
.close = NULL,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
#if 0
|
||||
.config = lpt_prt_escp_config
|
||||
#else
|
||||
.config = NULL
|
||||
#endif
|
||||
};
|
||||
|
||||
const lpt_device_t lpt_prt_escp_device = {
|
||||
.name = "Generic ESC/P Dot-Matrix Printer",
|
||||
.internal_name = "dot_matrix",
|
||||
@@ -2110,5 +2152,6 @@ const lpt_device_t lpt_prt_escp_device = {
|
||||
.epp_write_data = NULL,
|
||||
.epp_request_read = NULL,
|
||||
.priv = NULL,
|
||||
.lpt = NULL
|
||||
.lpt = NULL,
|
||||
.cfgdevice = &prt_escp_device
|
||||
};
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include <86box/86box.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/lpt.h>
|
||||
|
||||
@@ -513,6 +513,47 @@ prnt_close(void *priv)
|
||||
free(dev);
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
#if 0
|
||||
static const device_config_t lpt_prt_text_config[] = {
|
||||
{
|
||||
.name = "paper_size",
|
||||
.description = "Paper Size",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = NULL,
|
||||
.default_int = 0,
|
||||
.file_filter = NULL,
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Letter", .value = 0 },
|
||||
{ .description = "A4", .value = 1 },
|
||||
{ .description = "" }
|
||||
},
|
||||
.bios = { { 0 } }
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
#endif
|
||||
// clang-format on
|
||||
|
||||
const device_t prt_text_device = {
|
||||
.name = "Generic Text Printer",
|
||||
.internal_name = "text_prt",
|
||||
.flags = DEVICE_LPT,
|
||||
.local = 0,
|
||||
.init = NULL,
|
||||
.close = NULL,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
#if 0
|
||||
.config = lpt_prt_text_config
|
||||
#else
|
||||
.config = NULL
|
||||
#endif
|
||||
};
|
||||
|
||||
const lpt_device_t lpt_prt_text_device = {
|
||||
.name = "Generic Text Printer",
|
||||
.internal_name = "text_prt",
|
||||
@@ -527,5 +568,6 @@ const lpt_device_t lpt_prt_text_device = {
|
||||
.epp_write_data = NULL,
|
||||
.epp_request_read = NULL,
|
||||
.priv = NULL,
|
||||
.lpt = NULL
|
||||
.lpt = NULL,
|
||||
.cfgdevice = &prt_text_device
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user