Commit dc9cf9a4 authored by wind2009's avatar wind2009

Merge remote-tracking branch 'mercury/patch-irr-clipboard' into develop

parents ba4d2bd4 2e407cc7
Pipeline #43532 passed with stages
in 4 minutes and 40 seconds
......@@ -196,7 +196,7 @@ jobs:
- name: Download irrlicht
run: |
git clone --depth=1 https://github.com/mercury233/irrlicht
git clone --depth=1 -b patch-clipboard https://github.com/mercury233/irrlicht
- name: Check DirectX SDK
if: matrix.nodxsdk != true
......@@ -437,7 +437,7 @@ jobs:
- name: Download irrlicht
run: |
git clone --depth=1 https://github.com/mercury233/irrlicht
git clone --depth=1 -b patch-clipboard https://github.com/mercury233/irrlicht
- name: Copy premake files
run: |
......@@ -659,7 +659,7 @@ jobs:
- name: Download irrlicht
run: |
git clone --depth=1 https://github.com/mercury233/irrlicht
git clone --depth=1 -b patch-clipboard https://github.com/mercury233/irrlicht
- name: Copy premake files
run: |
......
......@@ -415,9 +415,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
case BUTTON_EXPORT_DECK_CODE: {
std::stringstream textStream;
deckManager.SaveDeck(deckManager.current_deck, textStream);
wchar_t text[0x10000];
BufferIO::DecodeUTF8(textStream.str().c_str(), text);
mainGame->env->getOSOperator()->copyToClipboard(text);
mainGame->env->getOSOperator()->copyToClipboard(textStream.str().c_str());
mainGame->stACMessage->setText(dataManager.GetSysString(1480));
mainGame->PopupElement(mainGame->wACMessage, 20);
break;
......@@ -516,11 +514,9 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
deckManager.current_deck.extra.clear();
deckManager.current_deck.side.clear();
} else {
const wchar_t* txt = mainGame->env->getOSOperator()->getTextFromClipboard();
const char* txt = mainGame->env->getOSOperator()->getTextFromClipboard();
if(txt) {
char text[0x10000];
BufferIO::EncodeUTF8(txt, text);
std::istringstream textStream(text);
std::istringstream textStream(txt);
deckManager.LoadCurrentDeck(textStream);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment