mirror of
https://github.com/libretro/stella2023.git
synced 2024-12-03 15:11:03 +00:00
(Hopefully) fixed bug when entering/exiting the debugger, whereby the
"`" key (or equivalent) was being shown in the prompt widget. Added method stubs for clipboard cut/copy/paste/select. Actually implementing them will come next. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3287 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
1e56f18b7e
commit
24051e4ddf
11
Changes.txt
11
Changes.txt
@ -12,6 +12,15 @@
|
||||
Release History
|
||||
===========================================================================
|
||||
|
||||
4.7.1 to 4.7.2: (xxx. xx, 2016)
|
||||
|
||||
* Fixed bug when entering and exiting the debugger; sometimes the
|
||||
character corresponding to the '`' key would be output in the
|
||||
prompt area.
|
||||
|
||||
-Have fun!
|
||||
|
||||
|
||||
4.7 to 4.7.1: (Feb. 13, 2016)
|
||||
|
||||
* Improved TV 'jitter' emulation; the recovery time can now be spread
|
||||
@ -40,8 +49,6 @@
|
||||
(thanks go to RomHunter for his tireless research in this area).
|
||||
Related to this, updated the snapshot collection.
|
||||
|
||||
-Have fun!
|
||||
|
||||
|
||||
4.6.7 to 4.7: (January 25, 2016)
|
||||
|
||||
|
@ -411,6 +411,11 @@ bool PromptWidget::handleKeyDown(StellaKey key, StellaMod mod)
|
||||
dirty = true;
|
||||
break;
|
||||
|
||||
case KBDK_GRAVE:
|
||||
// Swallow backtick, so we don't see it when exiting the debugger
|
||||
instance().eventHandler().enableTextEvents(false);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (instance().eventHandler().kbdControl(mod))
|
||||
{
|
||||
@ -524,15 +529,9 @@ void PromptWidget::specialKeys(StellaKey key)
|
||||
|
||||
switch(key)
|
||||
{
|
||||
case KBDK_A:
|
||||
_currentPos = _promptStartPos;
|
||||
break;
|
||||
case KBDK_D:
|
||||
killChar(+1);
|
||||
break;
|
||||
case KBDK_E:
|
||||
_currentPos = _promptEndPos;
|
||||
break;
|
||||
case KBDK_K:
|
||||
killLine(+1);
|
||||
break;
|
||||
@ -542,6 +541,18 @@ void PromptWidget::specialKeys(StellaKey key)
|
||||
case KBDK_W:
|
||||
killLastWord();
|
||||
break;
|
||||
case KBDK_A:
|
||||
textSelectAll();
|
||||
break;
|
||||
case KBDK_X:
|
||||
textCut();
|
||||
break;
|
||||
case KBDK_C:
|
||||
textCopy();
|
||||
break;
|
||||
case KBDK_V:
|
||||
textPaste();
|
||||
break;
|
||||
default:
|
||||
handled = false;
|
||||
break;
|
||||
@ -628,6 +639,30 @@ void PromptWidget::killLastWord()
|
||||
_promptEndPos -= cnt;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void PromptWidget::textSelectAll()
|
||||
{
|
||||
cerr << __func__ << endl;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void PromptWidget::textCut()
|
||||
{
|
||||
cerr << __func__ << endl;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void PromptWidget::textCopy()
|
||||
{
|
||||
cerr << __func__ << endl;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void PromptWidget::textPaste()
|
||||
{
|
||||
cerr << __func__ << endl;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void PromptWidget::addToHistory(const char* str)
|
||||
{
|
||||
|
@ -62,6 +62,12 @@ class PromptWidget : public Widget, public CommandSender
|
||||
void killLine(int direction);
|
||||
void killLastWord();
|
||||
|
||||
// Clipboard
|
||||
void textSelectAll();
|
||||
void textCut();
|
||||
void textCopy();
|
||||
void textPaste();
|
||||
|
||||
// History
|
||||
void addToHistory(const char *str);
|
||||
void historyScroll(int direction);
|
||||
|
@ -541,7 +541,7 @@ void EventHandler::handleKeyEvent(StellaKey key, StellaMod mod, bool state)
|
||||
// Handle keys which switch eventhandler state
|
||||
// Arrange the logic to take advantage of short-circuit evaluation
|
||||
if(!(kbdControl(mod) || kbdShift(mod) || kbdAlt(mod)) &&
|
||||
state && eventStateChange(myKeyTable[key][kEmulationMode]))
|
||||
!state && eventStateChange(myKeyTable[key][kEmulationMode]))
|
||||
return;
|
||||
|
||||
// Otherwise, let the event handler deal with it
|
||||
|
@ -329,6 +329,11 @@ class EventHandler
|
||||
*/
|
||||
void removeJoystickFromDatabase(const string& name);
|
||||
|
||||
/**
|
||||
Enable/disable text events (distinct from single-key events).
|
||||
*/
|
||||
virtual void enableTextEvents(bool enable) = 0;
|
||||
|
||||
protected:
|
||||
// Global OSystem object
|
||||
OSystem& myOSystem;
|
||||
@ -345,11 +350,6 @@ class EventHandler
|
||||
void handleJoyAxisEvent(int stick, int axis, int value);
|
||||
void handleJoyHatEvent(int stick, int hat, int value);
|
||||
|
||||
/**
|
||||
Enable/disable text events (distinct from single-key events).
|
||||
*/
|
||||
virtual void enableTextEvents(bool enable) = 0;
|
||||
|
||||
/**
|
||||
Returns the human-readable name for a StellaKey.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user