Skip to content

Commit

Permalink
Change some internal names
Browse files Browse the repository at this point in the history
  • Loading branch information
magiblot committed Sep 17, 2023
1 parent 6ece4c2 commit c8f1910
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion include/tvision/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class THardwareInfo
static BOOL getKeyEvent( TEvent& event ) noexcept;
static void clearPendingEvent() noexcept;
static void waitForEvent( int timeoutMs ) noexcept;
static void stopEventWait() noexcept;
static void interruptEventWait() noexcept;
static BOOL setClipboardText( TStringView text ) noexcept;
static BOOL requestClipboardText( void (&accept)( TStringView ) ) noexcept;

Expand Down
2 changes: 1 addition & 1 deletion include/tvision/internal/codepage.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CpTranslator

static void init() noexcept;

static uint32_t toUtf8Int(unsigned char c) noexcept
static uint32_t toPackedUtf8(unsigned char c) noexcept
{
uint32_t asInt;
memcpy(&asInt, (*currentToUtf8)[c], sizeof(asInt));
Expand Down
2 changes: 1 addition & 1 deletion include/tvision/internal/events.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class EventWaiter

bool getEvent(TEvent &ev) noexcept;
void waitForEvent(int ms) noexcept;
void stopEventWait() noexcept;
void interruptEventWait() noexcept;
};

} // namespace tvision
Expand Down
2 changes: 1 addition & 1 deletion include/tvision/internal/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class Platform

bool getEvent(TEvent &ev) noexcept;
void waitForEvent(int ms) noexcept { checkConsole(); waiter.waitForEvent(ms); }
void stopEventWait() noexcept { waiter.stopEventWait(); }
void interruptEventWait() noexcept { waiter.interruptEventWait(); }

int getButtonCount() noexcept
{ return console.lock([] (auto *c) { return c->input.getButtonCount(); }); }
Expand Down
2 changes: 1 addition & 1 deletion include/tvision/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ class TDisplay
smFont8x8 = 0x0100,
smColor256 = 0x0200,
smColorHigh = 0x0400,
smChanged = 0x1000
smUpdate = 0x8000,
};

static void clearScreen( uchar, uchar ) noexcept;
Expand Down
2 changes: 1 addition & 1 deletion source/platform/buffdisp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ inline void DisplayBuffer::validateCell(TScreenCell &cell) const noexcept
ch[0] = ' ';
else if (c < ' ' || 0x7F <= c)
// Translate from codepage as fallback.
ch.moveInt(CpTranslator::toUtf8Int(c));
ch.moveInt(CpTranslator::toPackedUtf8(c));
}
}

Expand Down
2 changes: 1 addition & 1 deletion source/platform/events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ void EventWaiter::waitForEvent(int ms) noexcept
}
}

void EventWaiter::stopEventWait() noexcept
void EventWaiter::interruptEventWait() noexcept
{
if (wakeUp)
wakeUp->signal();
Expand Down
4 changes: 2 additions & 2 deletions source/platform/hardware.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ void THardwareInfo::waitForEvent( int timeoutMs ) noexcept
}
}

void THardwareInfo::stopEventWait() noexcept
void THardwareInfo::interruptEventWait() noexcept
{
platf->stopEventWait();
platf->interruptEventWait();
}

BOOL THardwareInfo::setClipboardText( TStringView text ) noexcept
Expand Down
2 changes: 1 addition & 1 deletion source/platform/ttext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ TText::Lw TText::drawOneImpl( TSpan<TScreenCell> cells, size_t i,
if (text[j] == '\0')
cells[i]._ch.moveChar(' ');
else if (text[j] < ' ' || '\x7F' <= text[j])
cells[i]._ch.moveInt(CpTranslator::toUtf8Int(text[j]));
cells[i]._ch.moveInt(CpTranslator::toPackedUtf8(text[j]));
else
cells[i]._ch.moveChar(text[j]);
return {1, 1};
Expand Down
2 changes: 1 addition & 1 deletion source/tvision/hardwrvr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ void THardwareInfo::waitForEvent( int timeoutMs )
WaitForSingleObject( consoleHandle[cnInput], timeoutMs < 0 ? INFINITE : timeoutMs );
}

void THardwareInfo::stopEventWait()
void THardwareInfo::interruptEventWait()
{
}

Expand Down
2 changes: 1 addition & 1 deletion source/tvision/tevent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,6 @@ void TEvent::waitForEvent(int timeoutMs) noexcept
void TEvent::putNothing() noexcept
{
#if defined( __FLAT__ )
THardwareInfo::stopEventWait();
THardwareInfo::interruptEventWait();
#endif
}
2 changes: 1 addition & 1 deletion source/tvision/tprogram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ void TProgram::getEvent(TEvent& event)
}
if( event.what == evCommand && event.message.command == cmScreenChanged )
{
setScreenMode( TDisplay::smChanged );
setScreenMode( TDisplay::smUpdate );
clearEvent(event);
}
}
Expand Down
2 changes: 1 addition & 1 deletion source/tvision/tscreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ void TScreen::flushScreen() noexcept

void TScreen::setVideoMode( ushort mode ) noexcept
{
if ( mode != smChanged )
if ( mode != smUpdate )
setCrtMode( fixCrtMode( mode ) );
#ifdef __FLAT__
else
Expand Down

0 comments on commit c8f1910

Please sign in to comment.