Update from AW's master.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
parent
592a26332f
commit
545d6f9f4f
3 changed files with 44 additions and 21 deletions
|
@ -227,12 +227,15 @@ void getAppleWinPreferences(PreferenceData & data)
|
|||
data.hz50 = video.GetVideoRefreshRate() == VR_50HZ;
|
||||
data.monochromeColor.setRgb(video.GetMonochromeRGB());
|
||||
|
||||
const std::string & printerFilename = Printer_GetFilename();
|
||||
if (!printerFilename.empty())
|
||||
if (cardManager.IsParallelPrinterCardInstalled())
|
||||
{
|
||||
data.printerFilename = QString::fromStdString(printerFilename);
|
||||
ParallelPrinterCard* card = GetCardMgr().GetParallelPrinterCard();
|
||||
const std::string & printerFilename = card->GetFilename();
|
||||
if (!printerFilename.empty())
|
||||
{
|
||||
data.printerFilename = QString::fromStdString(printerFilename);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void setAppleWinPreferences(const std::shared_ptr<QtFrame> & frame, const PreferenceData & currentData, const PreferenceData & newData)
|
||||
|
@ -309,9 +312,13 @@ void setAppleWinPreferences(const std::shared_ptr<QtFrame> & frame, const Prefer
|
|||
|
||||
if (currentData.printerFilename != newData.printerFilename)
|
||||
{
|
||||
const std::string name = newData.printerFilename.toStdString();
|
||||
Printer_SetFilename(name);
|
||||
RegSaveString(TEXT(REG_CONFIG), REGVALUE_PRINTER_FILENAME, 1, name);
|
||||
if (cardManager.IsParallelPrinterCardInstalled())
|
||||
{
|
||||
ParallelPrinterCard* card = cardManager.GetParallelPrinterCard();
|
||||
const std::string name = newData.printerFilename.toStdString();
|
||||
card->SetFilename(name);
|
||||
RegSaveString(TEXT(REG_CONFIG), REGVALUE_PRINTER_FILENAME, 1, name);
|
||||
}
|
||||
}
|
||||
|
||||
if (currentData.videoType != newData.videoType || currentData.scanLines != newData.scanLines || currentData.verticalBlend != newData.verticalBlend
|
||||
|
|
|
@ -212,6 +212,8 @@ namespace sa2
|
|||
{
|
||||
if (ImGui::Begin("Settings", &myShowSettings))
|
||||
{
|
||||
CardManager & cardManager = GetCardMgr();
|
||||
|
||||
if (ImGui::BeginTabBar("Settings"))
|
||||
{
|
||||
if (ImGui::BeginTabItem("General"))
|
||||
|
@ -310,10 +312,9 @@ namespace sa2
|
|||
ImGui::Separator();
|
||||
|
||||
ImGui::LabelText("Slot", "Card");
|
||||
CardManager & manager = GetCardMgr();
|
||||
for (size_t slot = SLOT1; slot < NUM_SLOTS; ++slot)
|
||||
{
|
||||
const SS_CARDTYPE current = manager.QuerySlot(slot);
|
||||
const SS_CARDTYPE current = cardManager.QuerySlot(slot);
|
||||
if (ImGui::BeginCombo(std::to_string(slot).c_str(), getCardName(current).c_str()))
|
||||
{
|
||||
const std::vector<SS_CARDTYPE> & cards = getCardsForSlot(slot);
|
||||
|
@ -398,8 +399,6 @@ namespace sa2
|
|||
|
||||
if (ImGui::BeginTabItem("Disks"))
|
||||
{
|
||||
CardManager & cardManager = GetCardMgr();
|
||||
|
||||
bool enhancedSpeed = cardManager.GetDisk2CardMgr().GetEnhanceDisk();
|
||||
if (ImGui::Checkbox("Enhanced speed", &enhancedSpeed))
|
||||
{
|
||||
|
@ -542,16 +541,35 @@ namespace sa2
|
|||
|
||||
if (ImGui::BeginTabItem("Printer"))
|
||||
{
|
||||
ImGui::LabelText("Printer file", "%s", Printer_GetFilename().c_str());
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Reset"))
|
||||
if (cardManager.IsParallelPrinterCardInstalled())
|
||||
{
|
||||
PrintReset();
|
||||
ParallelPrinterCard* card = cardManager.GetParallelPrinterCard();
|
||||
ImGui::LabelText("Printer file", "%s", card->GetFilename().c_str());
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Reset"))
|
||||
{
|
||||
card->Reset(true);
|
||||
}
|
||||
ImGui::Separator();
|
||||
bool printerAppend = card->GetPrinterAppend();
|
||||
if (ImGui::Checkbox("Append", &printerAppend))
|
||||
{
|
||||
card->SetPrinterAppend(printerAppend);
|
||||
}
|
||||
|
||||
bool filterUnprintable = card->GetFilterUnprintable();
|
||||
if (ImGui::Checkbox("Filter unprintable", &filterUnprintable))
|
||||
{
|
||||
card->SetFilterUnprintable(filterUnprintable);
|
||||
}
|
||||
|
||||
bool convertEncoding = card->GetConvertEncoding();
|
||||
if (ImGui::Checkbox("Convert encoding", &convertEncoding))
|
||||
{
|
||||
card->SetConvertEncoding(convertEncoding);
|
||||
}
|
||||
}
|
||||
ImGui::Separator();
|
||||
ImGui::Checkbox("Append", &g_bPrinterAppend);
|
||||
ImGui::Checkbox("Filter unprintable", &g_bFilterUnprintable);
|
||||
ImGui::Checkbox("Convert encoding", &g_bConvertEncoding);
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include "Utilities.h"
|
||||
#include "SoundCore.h"
|
||||
#include "CPU.h"
|
||||
#include "ParallelPrinter.h"
|
||||
#include "Riff.h"
|
||||
#include "SaveState.h"
|
||||
#include "Memory.h"
|
||||
|
@ -140,7 +139,6 @@ void DestroyEmulator()
|
|||
SpkrDestroy();
|
||||
MB_Destroy();
|
||||
DSUninit();
|
||||
PrintDestroy();
|
||||
CpuDestroy();
|
||||
DebugDestroy();
|
||||
RiffFinishWriteFile();
|
||||
|
|
Loading…
Add table
Reference in a new issue