[+] EConanonicalInput::eTab

[+] if ^::eString, [+] ...isControlSequence, isAltSequence, isShiftSequence
[*] Update semaphore from class to struct types
[*] GetProfileDomain and frens should check the result string length before returning true
This commit is contained in:
Reece Wilson 2022-06-16 02:29:55 +01:00
parent 9fb9eb4fd2
commit d47aeda082
6 changed files with 21 additions and 13 deletions

View File

@ -21,6 +21,7 @@ namespace Aurora::Console::ConsoleStd
ePageUp,
ePageDown,
eScroll,
eTab,
eEnter
));
}

View File

@ -13,6 +13,9 @@ namespace Aurora::Console::ConsoleStd
{
ENoncanonicalInput type;
AuString string;
int scrollDeltaY;
int scrollDeltaY {};
bool isControlSequence {};
bool isAltSequence {};
bool isShiftSequence {};
};
}

View File

@ -9,9 +9,8 @@
namespace Aurora::Threading::Primitives
{
class ISemaphore : public IWaitable
struct ISemaphore : IWaitable
{
public:
virtual void Unlock(long count) = 0;
};

View File

@ -223,10 +223,12 @@ namespace Aurora::Console::ConsoleStd
case VK_RETURN:
canInput.type = ENoncanonicalInput::eEnter;
break;
case VK_TAB:
canInput.type = ENoncanonicalInput::eTab;
break;
default:
dBreak = true;
}
}
else
{
@ -243,6 +245,10 @@ namespace Aurora::Console::ConsoleStd
{
canInput.string += key;
}
canInput.isControlSequence = record.Event.KeyEvent.dwControlKeyState & (RIGHT_CTRL_PRESSED | LEFT_CTRL_PRESSED);
canInput.isAltSequence = record.Event.KeyEvent.dwControlKeyState & (RIGHT_ALT_PRESSED | LEFT_ALT_PRESSED);
canInput.isShiftSequence = record.Event.KeyEvent.dwControlKeyState & (SHIFT_PRESSED);
}
break;

View File

@ -47,13 +47,13 @@ namespace Aurora::IO::FS
AUKN_SYM bool GetSystemDomain(AuString &path)
{
path = gApplicationData;
return true;
return path.size();
}
AUKN_SYM bool GetProfileDomain(AuString &path)
{
path = gHomeDirectory;
return true;
return path.size();
}
AUKN_SYM bool GetSystemResourcePath(const AuString &fileName, AuString &path)
@ -312,7 +312,7 @@ namespace Aurora::IO::FS
return false;
}
path = gUserWritableAppData;
return true;
return path.size();
}
AUKN_SYM bool GetUserHome(AuString &path)
@ -323,7 +323,7 @@ namespace Aurora::IO::FS
return false;
}
path = gUserHomeDirectory;
return true;
return path.size();
}
AUKN_SYM bool GetPackagePath(AuString &path)
@ -340,7 +340,7 @@ namespace Aurora::IO::FS
return false;
}
path = gGlobalWritableAppDirectory;
return true;
return path.size();
}
AUKN_SYM bool GetRootAppdata(AuString &path)
@ -351,7 +351,7 @@ namespace Aurora::IO::FS
return false;
}
path = gAdminWritableAppDirectory;
return true;
return path.size();
}
AUKN_SYM bool GetUserProgramsFolder(AuString &path)
@ -362,7 +362,7 @@ namespace Aurora::IO::FS
return false;
}
path = gProgramsFolder;
return true;
return path.size();
}
#if defined(AURORA_PLATFORM_WIN32)

View File

@ -9,9 +9,8 @@
namespace Aurora::Threading::Primitives
{
class Semaphore : public ISemaphore
struct Semaphore : ISemaphore
{
public:
Semaphore(long intialValue = 0);
~Semaphore();