Alt-A from browser load the automountimage
This commit is contained in:
parent
369e2ff800
commit
d15641e57f
5 changed files with 23 additions and 7 deletions
|
@ -41,6 +41,7 @@ extern Options options;
|
|||
#define PNG_HEIGHT 200
|
||||
|
||||
extern void GlobalSetDeviceID(u8 id);
|
||||
extern void CheckAutoMountImage(EXIT_TYPE reset_reason , FileBrowser* fileBrowser);
|
||||
|
||||
unsigned char FileBrowser::LSTBuffer[FileBrowser::LSTBuffer_size];
|
||||
|
||||
|
@ -982,6 +983,10 @@ void FileBrowser::UpdateInputFolders()
|
|||
if (inputMappings->BrowseBack())
|
||||
PopFolder();
|
||||
}
|
||||
if (inputMappings->BrowseAutoLoad())
|
||||
{
|
||||
CheckAutoMountImage(EXIT_RESET, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -179,6 +179,8 @@ bool InputMappings::CheckKeyboardBrowseMode()
|
|||
// SetKeyboardFlag(PAGEDOWN_LCD_FLAG);
|
||||
else if (keyboard->KeyHeld(KEY_N) && keyboard->KeyEitherAlt() )
|
||||
SetKeyboardFlag(NEWD64_FLAG);
|
||||
else if (keyboard->KeyHeld(KEY_A) && keyboard->KeyEitherAlt() )
|
||||
SetKeyboardFlag(AUTOLOAD_FLAG);
|
||||
else
|
||||
{
|
||||
unsigned index;
|
||||
|
@ -206,6 +208,8 @@ void InputMappings::CheckKeyboardEmulationMode(unsigned numberOfImages, unsigned
|
|||
SetKeyboardFlag(PREV_FLAG);
|
||||
else if (keyboard->KeyHeld(KEY_PAGEDOWN))
|
||||
SetKeyboardFlag(NEXT_FLAG);
|
||||
else if (keyboard->KeyHeld(KEY_A) && keyboard->KeyEitherAlt() )
|
||||
SetKeyboardFlag(AUTOLOAD_FLAG);
|
||||
else if (numberOfImages > 1)
|
||||
{
|
||||
unsigned index;
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#define PAGEUP_LCD_FLAG (1 << 13)
|
||||
|
||||
#define NEWD64_FLAG (1 << 14)
|
||||
#define AUTOLOAD_FLAG (1 << 15)
|
||||
// dont exceed 32!!
|
||||
|
||||
class InputMappings : public Singleton<InputMappings>
|
||||
|
@ -148,6 +149,11 @@ public:
|
|||
return KeyboardFlag(NEWD64_FLAG);
|
||||
}
|
||||
|
||||
inline bool BrowseAutoLoad()
|
||||
{
|
||||
return KeyboardFlag(AUTOLOAD_FLAG);
|
||||
}
|
||||
|
||||
// Used by the 2 cores so need to be volatile
|
||||
//volatile static unsigned directDiskSwapRequest;
|
||||
static unsigned directDiskSwapRequest;
|
||||
|
|
|
@ -102,12 +102,6 @@ unsigned int screenHeight = 768;
|
|||
const char* termainalTextRed = "\E[31m";
|
||||
const char* termainalTextNormal = "\E[0m";
|
||||
|
||||
typedef enum {
|
||||
EXIT_UNKNOWN,
|
||||
EXIT_RESET,
|
||||
EXIT_CD,
|
||||
EXIT_KEYBOARD
|
||||
} EXIT_TYPE;
|
||||
EXIT_TYPE exitReason = EXIT_UNKNOWN;
|
||||
|
||||
// Hooks required for USPi library
|
||||
|
@ -654,7 +648,7 @@ void GlobalSetDeviceID(u8 id)
|
|||
SetVIAsDeviceID(id);
|
||||
}
|
||||
|
||||
static void CheckAutoMountImage(EXIT_TYPE reset_reason , FileBrowser* fileBrowser)
|
||||
void CheckAutoMountImage(EXIT_TYPE reset_reason , FileBrowser* fileBrowser)
|
||||
{
|
||||
const char* autoMountImageName = options.GetAutoMountImageName();
|
||||
if (autoMountImageName[0] != 0)
|
||||
|
|
|
@ -16,4 +16,11 @@ typedef enum {
|
|||
LCD_1106_128x64,
|
||||
} LCD_MODEL;
|
||||
|
||||
typedef enum {
|
||||
EXIT_UNKNOWN,
|
||||
EXIT_RESET,
|
||||
EXIT_CD,
|
||||
EXIT_KEYBOARD
|
||||
} EXIT_TYPE;
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue