mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-23 06:31:28 +00:00
chario: Cleanup.
This commit is contained in:
parent
daeecbe99e
commit
0af9d0c972
@ -1,6 +1,6 @@
|
||||
/*
|
||||
DingusPPC - The Experimental PowerPC Macintosh emulator
|
||||
Copyright (C) 2018-22 divingkatae and maximum
|
||||
Copyright (C) 2018-24 divingkatae and maximum
|
||||
(theweirdo) spatium
|
||||
|
||||
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
|
||||
@ -33,6 +33,11 @@ bool CharIoNull::rcv_char_available()
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CharIoNull::rcv_char_available_now()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
int CharIoNull::xmit_char(uint8_t c)
|
||||
{
|
||||
return 0;
|
||||
@ -108,7 +113,12 @@ void CharIoStdin::rcv_disable() {
|
||||
LOG_F(INFO, "Winterm: receiver disabled");
|
||||
}
|
||||
|
||||
bool CharIoStdin::rcv_char_available() {
|
||||
bool CharIoStdin::rcv_char_available()
|
||||
{
|
||||
return this->rcv_char_available_now();
|
||||
}
|
||||
|
||||
bool CharIoStdin::rcv_char_available_now() {
|
||||
DWORD events;
|
||||
INPUT_RECORD buffer;
|
||||
|
||||
@ -344,7 +354,7 @@ bool CharIoSocket::rcv_char_available()
|
||||
consecutivechars = 0;
|
||||
return 0;
|
||||
}
|
||||
return rcv_char_available_now();
|
||||
return this->rcv_char_available_now();
|
||||
}
|
||||
|
||||
bool CharIoSocket::rcv_char_available_now()
|
||||
@ -444,7 +454,7 @@ bool CharIoSocket::rcv_char_available_now()
|
||||
int CharIoSocket::xmit_char(uint8_t c)
|
||||
{
|
||||
if (acceptfd == -1)
|
||||
CharIoSocket::rcv_char_available_now();
|
||||
this->rcv_char_available_now();
|
||||
|
||||
if (acceptfd != -1) {
|
||||
int sent = (int)send(acceptfd, &c, 1, 0);
|
||||
@ -470,7 +480,7 @@ int CharIoSocket::xmit_char(uint8_t c)
|
||||
int CharIoSocket::rcv_char(uint8_t *c)
|
||||
{
|
||||
if (acceptfd == -1)
|
||||
CharIoSocket::rcv_char_available_now();
|
||||
this->rcv_char_available_now();
|
||||
|
||||
if (acceptfd != -1) {
|
||||
int received = (int)recv(acceptfd, c, 1, 0);
|
||||
|
@ -47,10 +47,7 @@ public:
|
||||
virtual int rcv_enable() { return 0; };
|
||||
virtual void rcv_disable() {};
|
||||
virtual bool rcv_char_available() = 0;
|
||||
//virtual bool rcv_char_available_now ()
|
||||
bool rcv_char_available_now() {
|
||||
return rcv_char_available();
|
||||
}
|
||||
virtual bool rcv_char_available_now() = 0;
|
||||
virtual int xmit_char(uint8_t c) = 0;
|
||||
virtual int rcv_char(uint8_t *c) = 0;
|
||||
};
|
||||
@ -62,6 +59,7 @@ public:
|
||||
~CharIoNull() = default;
|
||||
|
||||
bool rcv_char_available();
|
||||
bool rcv_char_available_now();
|
||||
int xmit_char(uint8_t c);
|
||||
int rcv_char(uint8_t *c);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user