mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-13 19:49:36 +00:00
Re-add clipboard functions
This commit is contained in:
@@ -122,8 +122,18 @@ namespace PortabilityLayer
|
||||
|
||||
bool MemoryManagerImpl::ResizeHandle(MMHandleBlock *hdl, size_t newSize)
|
||||
{
|
||||
if (hdl->m_contents == nullptr)
|
||||
return false;
|
||||
if (hdl->m_contents == nullptr)
|
||||
{
|
||||
if (newSize != 0)
|
||||
{
|
||||
void *newBuf = Alloc(newSize);
|
||||
if (!newBuf)
|
||||
return false;
|
||||
|
||||
hdl->m_contents = newBuf;
|
||||
hdl->m_size = newSize;
|
||||
}
|
||||
}
|
||||
|
||||
if (newSize != hdl->m_size)
|
||||
{
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
|
||||
void THandleBase::Dispose() const
|
||||
{
|
||||
if (m_hdl)
|
||||
if (m_hdl)
|
||||
PortabilityLayer::MemoryManager::GetInstance()->ReleaseHandle(m_hdl);
|
||||
}
|
||||
|
||||
@@ -82,5 +82,6 @@ void AppendMenuItem(MenuHandle menu, int8_t iconResID, uint8_t key, uint8_t subm
|
||||
|
||||
void SetMenuItemText(MenuHandle menu, int index, const PLPasStr &text)
|
||||
{
|
||||
PL_NotYetImplemented();
|
||||
PortabilityLayer::MenuManager *mm = PortabilityLayer::MenuManager::GetInstance();
|
||||
mm->SetItemText(menu, index - 1, text);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user