Commit d536b9a9 authored by Chen Bill's avatar Chen Bill

fix UpdateDeck

parent 9bad0df6
...@@ -13,12 +13,8 @@ ...@@ -13,12 +13,8 @@
namespace ygo { namespace ygo {
void UpdateDeck() { void UpdateDeck() {
auto category = mainGame->cbCategorySelect->getItem(mainGame->cbCategorySelect->getSelected()); BufferIO::CopyWideString(mainGame->cbCategorySelect->getText(), mainGame->gameConf.lastcategory);
if (category) BufferIO::CopyWideString(mainGame->cbDeckSelect->getText(), mainGame->gameConf.lastdeck);
BufferIO::CopyWideString(category, mainGame->gameConf.lastcategory);
auto deckname = mainGame->cbDeckSelect->getItem(mainGame->cbDeckSelect->getSelected());
if (deckname)
BufferIO::CopyWideString(deckname, mainGame->gameConf.lastdeck);
unsigned char deckbuf[1024]{}; unsigned char deckbuf[1024]{};
auto pdeck = deckbuf; auto pdeck = deckbuf;
BufferIO::WriteInt32(pdeck, deckManager.current_deck.main.size() + deckManager.current_deck.extra.size()); BufferIO::WriteInt32(pdeck, deckManager.current_deck.main.size() + deckManager.current_deck.extra.size());
......
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