Merge branch 'master' of ssh://github.com/86Box/86Box
This commit is contained in:
32
src/config.c
32
src/config.c
@@ -473,6 +473,12 @@ load_video(void)
|
||||
show_second_monitors = !!ini_section_get_int(cat, "show_second_monitors", 1);
|
||||
video_fullscreen_scale_maximized = !!ini_section_get_int(cat, "video_fullscreen_scale_maximized", 0);
|
||||
|
||||
vid_cga_comp_brightness = ini_section_get_int(cat, "vid_cga_comp_brightness", 0);
|
||||
vid_cga_comp_sharpness = ini_section_get_int(cat, "vid_cga_comp_sharpness", 0);
|
||||
vid_cga_comp_contrast = ini_section_get_int(cat, "vid_cga_comp_contrast", 100);
|
||||
vid_cga_comp_hue = ini_section_get_int(cat, "vid_cga_comp_hue", 0);
|
||||
vid_cga_comp_saturation = ini_section_get_int(cat, "vid_cga_comp_saturation", 100);
|
||||
|
||||
// TODO
|
||||
for (uint8_t i = 1; i < GFXCARD_MAX; i ++) {
|
||||
p = ini_section_get_string(cat, "gfxcard_2", NULL);
|
||||
@@ -2451,6 +2457,32 @@ save_video(void)
|
||||
ini_section_set_string(cat, "gfxcard",
|
||||
video_get_internal_name(gfxcard[0]));
|
||||
|
||||
|
||||
if (vid_cga_comp_brightness)
|
||||
ini_section_set_int(cat, "vid_cga_comp_brightness", vid_cga_comp_brightness);
|
||||
else
|
||||
ini_section_delete_var(cat, "vid_cga_comp_brightness");
|
||||
|
||||
if (vid_cga_comp_sharpness)
|
||||
ini_section_set_int(cat, "vid_cga_comp_sharpness", vid_cga_comp_sharpness);
|
||||
else
|
||||
ini_section_delete_var(cat, "vid_cga_comp_sharpness");
|
||||
|
||||
if (vid_cga_comp_contrast != 100)
|
||||
ini_section_set_int(cat, "vid_cga_comp_contrast", vid_cga_comp_contrast);
|
||||
else
|
||||
ini_section_delete_var(cat, "vid_cga_comp_contrast");
|
||||
|
||||
if (vid_cga_comp_hue)
|
||||
ini_section_set_int(cat, "vid_cga_comp_hue", vid_cga_comp_hue);
|
||||
else
|
||||
ini_section_delete_var(cat, "vid_cga_comp_hue");
|
||||
|
||||
if (vid_cga_comp_saturation != 100)
|
||||
ini_section_set_int(cat, "vid_cga_comp_saturation", vid_cga_comp_saturation);
|
||||
else
|
||||
ini_section_delete_var(cat, "vid_cga_comp_saturation");
|
||||
|
||||
if (voodoo_enabled == 0)
|
||||
ini_section_delete_var(cat, "voodoo");
|
||||
else
|
||||
|
||||
@@ -126,6 +126,11 @@ extern int scale; /* (C) screen scale factor */
|
||||
extern int dpi_scale; /* (C) DPI scaling of the emulated screen */
|
||||
extern int vid_api; /* (C) video renderer */
|
||||
extern int vid_cga_contrast; /* (C) video */
|
||||
extern int vid_cga_comp_brightness; /* (C) CGA composite brightness */
|
||||
extern int vid_cga_comp_sharpness; /* (C) CGA composite sharpness */
|
||||
extern int vid_cga_comp_hue; /* (C) CGA composite hue */
|
||||
extern int vid_cga_comp_saturation; /* (C) CGA composite saturation */
|
||||
extern int vid_cga_comp_contrast; /* (C) CGA composite saturation */
|
||||
extern int video_fullscreen; /* (C) video */
|
||||
extern int video_fullscreen_scale; /* (C) video */
|
||||
extern int enable_overscan; /* (C) video */
|
||||
|
||||
@@ -21,11 +21,13 @@
|
||||
#ifndef VIDEO_CGA_COMP_H
|
||||
#define VIDEO_CGA_COMP_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#define Bitu unsigned int
|
||||
#define bool uint8_t
|
||||
|
||||
void update_cga16_color(uint8_t cgamode);
|
||||
void cga_comp_init(int revision);
|
||||
void cga_comp_reload(int new_brightness, int new_saturation, int new_sharpness, int new_hue, int new_contrast);
|
||||
uint32_t *Composite_Process(uint8_t cgamode, uint8_t border, uint32_t blocks /*, bool doublewidth*/, uint32_t *TempLine);
|
||||
|
||||
#endif /*VIDEO_CGA_COMP_H*/
|
||||
|
||||
@@ -140,6 +140,7 @@ typedef struct monitor_t {
|
||||
const video_timings_t *mon_vid_timings;
|
||||
int mon_vid_type;
|
||||
atomic_bool mon_interlace;
|
||||
atomic_bool mon_composite;
|
||||
struct blit_data_struct *mon_blit_data_ptr;
|
||||
} monitor_t;
|
||||
|
||||
|
||||
@@ -257,6 +257,7 @@ add_library(ui STATIC
|
||||
|
||||
qt_iconindicators.hpp
|
||||
qt_iconindicators.cpp
|
||||
qt_cgasettingsdialog.hpp qt_cgasettingsdialog.cpp qt_cgasettingsdialog.ui
|
||||
)
|
||||
|
||||
if(EMU_BUILD_NUM)
|
||||
|
||||
@@ -2936,3 +2936,21 @@ msgstr ""
|
||||
|
||||
msgid "&Update mouse every CPU frame"
|
||||
msgstr ""
|
||||
|
||||
msgid "Hue"
|
||||
msgstr ""
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr ""
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr ""
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr ""
|
||||
|
||||
@@ -2936,3 +2936,21 @@ msgstr "%1 Hz"
|
||||
|
||||
msgid "&Update mouse every CPU frame"
|
||||
msgstr "&Aktualizovat myš při každém rámce CPU"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Hue"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Saturace"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Kontrast"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Jas"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Ostrý"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "Kompozitní nastavení CGA..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Maus bei jedem CPU-Frame aktualisieren"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "ZIP-Abbilder"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Hue"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Sättigung"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Kontrast"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Helligkeit"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Schärfe"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "CGA-Kompositeinstellungen..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Actualiza el estado del ratón en cada bloco de CPU"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "Imagenes ZIP"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Tono"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Saturación"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Contraste"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Brillo"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Nitidez"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "Configuración compuesta CGA..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Mettre à jour le statut du souris en qualquier bloc de processeur"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "Images ZIP"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Teinte"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Saturation"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Contraste"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Luminosité"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Netteté"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "Paramètres composites CGA..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Ažuriraj status miša kod skavog bloka procesora"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "ZIP slike"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Hue"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Telítettség"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Kontraszt"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Fényerő"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Élesség"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "CGA összetett beállítások..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Aggiorano stato mouse ad ogni blocco CPU"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "Immagini ZIP"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Hue"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Saturazione"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Contrasto"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Luminosità"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Nitidezza"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "Impostazioni composite CGA..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "マウスをCPUフレームごとに更新(&U)"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "ZIPイメージ"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "色相"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "飽和"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "対比"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "明るさ"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "シャープネス"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "CGA コンポジット設定..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr ""
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "ZIP 이미지"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "색조"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "포화도"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "대조"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "밝기"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "선명도"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "CGA 복합 설정..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Muis bijwerken bij elk CPU-frame"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "ZIP-images"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Hue"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Verzadiging"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Contrast"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Helderheid"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Scherpte"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "CGA-composietinstellingen..."
|
||||
|
||||
@@ -2936,3 +2936,21 @@ msgstr "System nie będzie dodany."
|
||||
|
||||
msgid "&Update mouse every CPU frame"
|
||||
msgstr "Aktualizuj &mysz z każdą ramką CPU"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Barwa"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Nasycenie"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Kontrast"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Jasność"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Ostrość"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "Ustawienia kompozytowe CGA..."
|
||||
|
||||
@@ -2936,3 +2936,21 @@ msgstr "O sistema não será adicionado."
|
||||
|
||||
msgid "&Update mouse every CPU frame"
|
||||
msgstr "At&ualiza o estado do mouse em cada quadro do CPU"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Matiz"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Saturação"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Contraste"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Brilho"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Nitidez"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "Configurações compostas CGA..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Atualiza o estado do rato em cada bloco do CPU"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "Imagens ZIP"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Matiz"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Saturação"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Contraste"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Brilho"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Nitidez"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "Configurações compostas CGA..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Обновлять мышь при каждом кадре ЦП"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "Образы ZIP"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Тон"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Насыщенность"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Контраст"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Яркость"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Резкость"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "Настройки композитного видео CGA..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Aktualizovať myš pri každom rámci CPU"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "Obrazy ZIP diskov"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Odtieň"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Sýtosť"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Kontrast"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Jas"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Ostrý"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "Kompozitné nastavenia CGA..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Posodibi stanje miške ob vsakem bloku procesorja"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "ZIP slike"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Hue"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Nasičenost"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Kontrast"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Svetlost"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Ostrina"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "CGA sestavljene nastavitve..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr ""
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "Zip-avbildningar"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Hue"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Mättnad"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Kontrast"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Ljusstyrka"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Skärpa"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "CGA-kompositinställningar..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr ""
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "ZIP imajları"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Hue"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Doygunluk"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Kontrast"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Parlaklık"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Keskinlik"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "CGA bileşik ayarları..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Оновлювати мишу при кожному кадрі ЦП"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "Образи ZIP"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Відтінок"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Насичення"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Контраст"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Яскравість"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Гострота"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "Комбіновані налаштування CGA..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Cập nhật chuột mỗi cỡ khung CPU"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "Ảnh đĩa ZIP"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Huế"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Độ bão hòa"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Sự tương phản"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Độ sáng"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Độ sắc nét"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "Cài đặt composite CGA..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr ""
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "ZIP 映像"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "色调"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "饱和度"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "对比"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "亮度"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "锐度"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "CGA 复合设置..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr ""
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "ZIP 映像"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "色調"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "飽和度"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "對比"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "亮度"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "銳利度"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "CGA 複合設定..."
|
||||
|
||||
94
src/qt/qt_cgasettingsdialog.cpp
Normal file
94
src/qt/qt_cgasettingsdialog.cpp
Normal file
@@ -0,0 +1,94 @@
|
||||
#include "qt_cgasettingsdialog.hpp"
|
||||
#include "ui_qt_cgasettingsdialog.h"
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include <86box/86box.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/vid_cga_comp.h>
|
||||
}
|
||||
|
||||
CGASettingsDialog::CGASettingsDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::CGASettingsDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
cga_hue = vid_cga_comp_hue;
|
||||
cga_saturation = vid_cga_comp_saturation;
|
||||
cga_brightness = vid_cga_comp_brightness;
|
||||
cga_contrast = vid_cga_comp_contrast;
|
||||
cga_sharpness = vid_cga_comp_sharpness;
|
||||
|
||||
ui->horizontalSliderHue->setValue(vid_cga_comp_hue);
|
||||
ui->horizontalSliderSaturation->setValue(vid_cga_comp_saturation);
|
||||
ui->horizontalSliderBrightness->setValue(vid_cga_comp_brightness);
|
||||
ui->horizontalSliderContrast->setValue(vid_cga_comp_contrast);
|
||||
ui->horizontalSliderSharpness->setValue(vid_cga_comp_sharpness);
|
||||
|
||||
connect(ui->buttonBox->button(QDialogButtonBox::Apply), &QPushButton::clicked, this, &CGASettingsDialog::applySettings);
|
||||
connect(ui->buttonBox->button(QDialogButtonBox::Reset), &QPushButton::clicked, this, [this]
|
||||
{
|
||||
ui->horizontalSliderHue->setValue(0);
|
||||
ui->horizontalSliderSaturation->setValue(100);
|
||||
ui->horizontalSliderBrightness->setValue(0);
|
||||
ui->horizontalSliderContrast->setValue(100);
|
||||
ui->horizontalSliderSharpness->setValue(0);
|
||||
});
|
||||
|
||||
connect(ui->horizontalSliderHue, &QSlider::valueChanged, this, [this] { updateDisplay(); } );
|
||||
connect(ui->horizontalSliderSaturation, &QSlider::valueChanged, this, [this] { updateDisplay(); } );
|
||||
connect(ui->horizontalSliderBrightness, &QSlider::valueChanged, this, [this] { updateDisplay(); } );
|
||||
connect(ui->horizontalSliderContrast, &QSlider::valueChanged, this, [this] { updateDisplay(); } );
|
||||
connect(ui->horizontalSliderSharpness, &QSlider::valueChanged, this, [this] { updateDisplay(); } );
|
||||
}
|
||||
|
||||
CGASettingsDialog::~CGASettingsDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void CGASettingsDialog::updateDisplay()
|
||||
{
|
||||
auto temp_cga_comp_hue = ui->horizontalSliderHue->value();
|
||||
auto temp_cga_comp_saturation = ui->horizontalSliderSaturation->value();
|
||||
auto temp_cga_comp_brightness = ui->horizontalSliderBrightness->value();
|
||||
auto temp_cga_comp_contrast = ui->horizontalSliderContrast->value();
|
||||
auto temp_cga_comp_sharpness = ui->horizontalSliderSharpness->value();
|
||||
cga_comp_reload(temp_cga_comp_brightness, temp_cga_comp_saturation, temp_cga_comp_sharpness, temp_cga_comp_hue, temp_cga_comp_contrast);
|
||||
}
|
||||
|
||||
void CGASettingsDialog::applySettings()
|
||||
{
|
||||
vid_cga_comp_hue = ui->horizontalSliderHue->value();
|
||||
vid_cga_comp_saturation = ui->horizontalSliderSaturation->value();
|
||||
vid_cga_comp_brightness = ui->horizontalSliderBrightness->value();
|
||||
vid_cga_comp_contrast = ui->horizontalSliderContrast->value();
|
||||
vid_cga_comp_sharpness = ui->horizontalSliderSharpness->value();
|
||||
cga_comp_reload(vid_cga_comp_brightness, vid_cga_comp_saturation, vid_cga_comp_sharpness, vid_cga_comp_hue, vid_cga_comp_contrast);
|
||||
|
||||
cga_hue = vid_cga_comp_hue;
|
||||
cga_saturation = vid_cga_comp_saturation;
|
||||
cga_brightness = vid_cga_comp_brightness;
|
||||
cga_contrast = vid_cga_comp_contrast;
|
||||
cga_sharpness = vid_cga_comp_sharpness;
|
||||
}
|
||||
|
||||
void CGASettingsDialog::on_buttonBox_accepted()
|
||||
{
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void CGASettingsDialog::on_buttonBox_rejected()
|
||||
{
|
||||
vid_cga_comp_hue = cga_hue;
|
||||
vid_cga_comp_saturation = cga_saturation;
|
||||
vid_cga_comp_brightness = cga_brightness;
|
||||
vid_cga_comp_contrast = cga_contrast;
|
||||
vid_cga_comp_sharpness = cga_sharpness;
|
||||
|
||||
cga_comp_reload(vid_cga_comp_brightness, vid_cga_comp_saturation, vid_cga_comp_sharpness, vid_cga_comp_hue, vid_cga_comp_contrast);
|
||||
}
|
||||
|
||||
31
src/qt/qt_cgasettingsdialog.hpp
Normal file
31
src/qt/qt_cgasettingsdialog.hpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef QT_CGASETTINGSDIALOG_HPP
|
||||
#define QT_CGASETTINGSDIALOG_HPP
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class CGASettingsDialog;
|
||||
}
|
||||
|
||||
class CGASettingsDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CGASettingsDialog(QWidget *parent = nullptr);
|
||||
~CGASettingsDialog();
|
||||
|
||||
private slots:
|
||||
void on_buttonBox_accepted();
|
||||
|
||||
void on_buttonBox_rejected();
|
||||
|
||||
private:
|
||||
Ui::CGASettingsDialog *ui;
|
||||
|
||||
void applySettings();
|
||||
void updateDisplay();
|
||||
|
||||
int cga_hue, cga_saturation, cga_sharpness, cga_brightness, cga_contrast;
|
||||
};
|
||||
|
||||
#endif // QT_CGASETTINGSDIALOG_HPP
|
||||
167
src/qt/qt_cgasettingsdialog.ui
Normal file
167
src/qt/qt_cgasettingsdialog.ui
Normal file
@@ -0,0 +1,167 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CGASettingsDialog</class>
|
||||
<widget class="QDialog" name="CGASettingsDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>CGA composite settings...</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SizeConstraint::SetFixedSize</enum>
|
||||
</property>
|
||||
<item row="2" column="2">
|
||||
<widget class="QSlider" name="horizontalSliderBrightness">
|
||||
<property name="minimum">
|
||||
<number>-100</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QSlider" name="horizontalSliderSaturation">
|
||||
<property name="maximum">
|
||||
<number>360</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Hue</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QSlider" name="horizontalSliderSharpness">
|
||||
<property name="minimum">
|
||||
<number>-50</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::StandardButton::Apply|QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok|QDialogButtonBox::StandardButton::Reset</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QSlider" name="horizontalSliderContrast">
|
||||
<property name="maximum">
|
||||
<number>360</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Contrast</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QSlider" name="horizontalSliderHue">
|
||||
<property name="minimum">
|
||||
<number>-360</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>360</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Sharpness</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Saturation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Brightness</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>CGASettingsDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>CGASettingsDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -33,6 +33,8 @@
|
||||
#include "qt_rendererstack.hpp"
|
||||
#include "qt_renderercommon.hpp"
|
||||
|
||||
#include "qt_cgasettingsdialog.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include <86box/86box.h>
|
||||
#include <86box/config.h>
|
||||
@@ -293,6 +295,13 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
#else
|
||||
ui->menuTablet_tool->menuAction()->setVisible(false);
|
||||
#endif
|
||||
|
||||
bool enable_comp_option = false;
|
||||
for (int i = 0; i < MONITORS_NUM; i++) {
|
||||
if (monitors[i].mon_composite) { enable_comp_option = true; break; }
|
||||
}
|
||||
|
||||
ui->actionCGA_composite_settings->setEnabled(enable_comp_option);
|
||||
});
|
||||
|
||||
connect(this, &MainWindow::showMessageForNonQtThread, this, &MainWindow::showMessage_, Qt::QueuedConnection);
|
||||
@@ -1497,7 +1506,7 @@ MainWindow::eventFilter(QObject *receiver, QEvent *event)
|
||||
if (event->type() == QEvent::WindowBlocked) {
|
||||
window_blocked = true;
|
||||
curdopause = dopause;
|
||||
plat_pause(isShowMessage ? 2 : 1);
|
||||
plat_pause(isNonPause ? dopause : (isShowMessage ? 2 : 1));
|
||||
emit setMouseCapture(false);
|
||||
releaseKeyboard();
|
||||
} else if (event->type() == QEvent::WindowUnblocked) {
|
||||
@@ -1530,6 +1539,13 @@ MainWindow::refreshMediaMenu()
|
||||
int int_ax_kbd = machine_has_flags(machine, MACHINE_KEYBOARD_JIS) &&
|
||||
!machine_has_bus(machine, MACHINE_BUS_PS2_PORTS);
|
||||
kana_label->setVisible(ext_ax_kbd || int_ax_kbd);
|
||||
|
||||
bool enable_comp_option = false;
|
||||
for (int i = 0; i < MONITORS_NUM; i++) {
|
||||
if (monitors[i].mon_composite) { enable_comp_option = true; break; }
|
||||
}
|
||||
|
||||
ui->actionCGA_composite_settings->setEnabled(enable_comp_option);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -2329,3 +2345,14 @@ void MainWindow::on_actionACPI_Shutdown_triggered()
|
||||
{
|
||||
acpi_pwrbut_pressed = 1;
|
||||
}
|
||||
|
||||
void MainWindow::on_actionCGA_composite_settings_triggered()
|
||||
{
|
||||
isNonPause = true;
|
||||
CGASettingsDialog dialog;
|
||||
dialog.setModal(true);
|
||||
dialog.exec();
|
||||
isNonPause = false;
|
||||
config_save();
|
||||
}
|
||||
|
||||
|
||||
@@ -168,6 +168,8 @@ private slots:
|
||||
|
||||
void on_actionApply_fullscreen_stretch_mode_when_maximized_triggered(bool checked);
|
||||
|
||||
void on_actionCGA_composite_settings_triggered();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
std::unique_ptr<MachineStatus> status;
|
||||
@@ -204,6 +206,7 @@ private:
|
||||
QIcon caps_icon_off, scroll_icon_off, num_icon_off, kana_icon_off;
|
||||
|
||||
bool isShowMessage = false;
|
||||
bool isNonPause = false;
|
||||
bool window_blocked = false;
|
||||
};
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>724</width>
|
||||
<height>23</height>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuAction">
|
||||
@@ -205,6 +205,7 @@
|
||||
<addaction name="actionFullscreen"/>
|
||||
<addaction name="menuFullscreen_stretch_mode"/>
|
||||
<addaction name="actionApply_fullscreen_stretch_mode_when_maximized"/>
|
||||
<addaction name="actionCGA_composite_settings"/>
|
||||
<addaction name="menuEGA_S_VGA_settings"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionCGA_PCjr_Tandy_EGA_S_VGA_overscan"/>
|
||||
@@ -232,7 +233,7 @@
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
<widget class="QToolBar" name="toolBar">
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::PreventContextMenu</enum>
|
||||
<enum>Qt::ContextMenuPolicy::PreventContextMenu</enum>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true">toolBar</string>
|
||||
@@ -244,7 +245,7 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="allowedAreas">
|
||||
<set>Qt::TopToolBarArea</set>
|
||||
<set>Qt::ToolBarArea::TopToolBarArea</set>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
@@ -253,7 +254,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonIconOnly</enum>
|
||||
<enum>Qt::ToolButtonStyle::ToolButtonIconOnly</enum>
|
||||
</property>
|
||||
<property name="floatable">
|
||||
<bool>false</bool>
|
||||
@@ -368,7 +369,7 @@
|
||||
<string>E&xit</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::QuitRole</enum>
|
||||
<enum>QAction::MenuRole::QuitRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSettings">
|
||||
@@ -380,7 +381,7 @@
|
||||
<string>&Settings...</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::NoRole</enum>
|
||||
<enum>QAction::MenuRole::NoRole</enum>
|
||||
</property>
|
||||
<property name="iconVisibleInMenu">
|
||||
<bool>false</bool>
|
||||
@@ -682,7 +683,7 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::AboutQtRole</enum>
|
||||
<enum>QAction::MenuRole::AboutQtRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAbout_86Box">
|
||||
@@ -690,7 +691,7 @@
|
||||
<string>&About 86Box...</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::AboutRole</enum>
|
||||
<enum>QAction::MenuRole::AboutRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDocumentation">
|
||||
@@ -743,7 +744,7 @@
|
||||
<string>&Preferences...</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::PreferencesRole</enum>
|
||||
<enum>QAction::MenuRole::PreferencesRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionEnable_Discord_integration">
|
||||
@@ -816,7 +817,7 @@
|
||||
<string>Renderer &options...</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::NoRole</enum>
|
||||
<enum>QAction::MenuRole::NoRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionVulkan">
|
||||
@@ -888,6 +889,11 @@
|
||||
<string>&Pen</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionCGA_composite_settings">
|
||||
<property name="text">
|
||||
<string>CGA composite settings...</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
||||
@@ -439,6 +439,8 @@ plat_pause(int p)
|
||||
}
|
||||
|
||||
if ((!!p) == dopause) {
|
||||
QTimer::singleShot(0, main_window, &MainWindow::updateUiPauseState);
|
||||
|
||||
#ifdef Q_OS_WINDOWS
|
||||
if (source_hwnd)
|
||||
PostMessage((HWND) (uintptr_t) source_hwnd, WM_SENDSTATUS, (WPARAM) !!p, (LPARAM) (HWND) main_window->winId());
|
||||
|
||||
@@ -788,6 +788,8 @@ cga_standalone_init(UNUSED(const device_t *info))
|
||||
break;
|
||||
}
|
||||
|
||||
monitors[monitor_index_global].mon_composite = !!cga->composite;
|
||||
|
||||
return cga;
|
||||
}
|
||||
|
||||
|
||||
@@ -361,6 +361,8 @@ colorplus_standalone_init(UNUSED(const device_t *info))
|
||||
lpt_port_setup(colorplus->lpt, LPT_MDA_ADDR);
|
||||
lpt_set_3bc_used(1);
|
||||
|
||||
monitors[monitor_index_global].mon_composite = colorplus->cga.composite;
|
||||
|
||||
return colorplus;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,9 +28,12 @@
|
||||
#include <86box/mem.h>
|
||||
#include <86box/vid_cga.h>
|
||||
#include <86box/vid_cga_comp.h>
|
||||
#include <86box/thread.h>
|
||||
|
||||
int CGA_Composite_Table[1024];
|
||||
|
||||
static mutex_t* cga_comp_mutex = NULL;
|
||||
|
||||
static double brightness = 0;
|
||||
static double contrast = 100;
|
||||
static double saturation = 100;
|
||||
@@ -69,23 +72,30 @@ static double intensity[4] = {
|
||||
|
||||
#define NEW_CGA(c, i, r, g, b) (((c) / 0.72) * 0.29 + ((i) / 0.28) * 0.32 + ((r) / 0.28) * 0.1 + ((g) / 0.28) * 0.22 + ((b) / 0.28) * 0.07)
|
||||
|
||||
double mode_brightness;
|
||||
double mode_contrast;
|
||||
double mode_hue;
|
||||
double min_v;
|
||||
double max_v;
|
||||
volatile double mode_brightness;
|
||||
volatile double mode_contrast;
|
||||
volatile double mode_hue;
|
||||
volatile double min_v;
|
||||
volatile double max_v;
|
||||
|
||||
double video_ri;
|
||||
double video_rq;
|
||||
double video_gi;
|
||||
double video_gq;
|
||||
double video_bi;
|
||||
double video_bq;
|
||||
int video_sharpness;
|
||||
int tandy_mode_control = 0;
|
||||
volatile double video_ri;
|
||||
volatile double video_rq;
|
||||
volatile double video_gi;
|
||||
volatile double video_gq;
|
||||
volatile double video_bi;
|
||||
volatile double video_bq;
|
||||
volatile int video_sharpness;
|
||||
|
||||
static bool new_cga = 0;
|
||||
|
||||
static uint8_t current_cgamode = 0;
|
||||
|
||||
int vid_cga_comp_brightness = 0;
|
||||
int vid_cga_comp_sharpness = 0;
|
||||
int vid_cga_comp_hue = 0;
|
||||
int vid_cga_comp_saturation = 100;
|
||||
int vid_cga_comp_contrast = 100;
|
||||
|
||||
void
|
||||
update_cga16_color(uint8_t cgamode)
|
||||
{
|
||||
@@ -109,6 +119,14 @@ update_cga16_color(uint8_t cgamode)
|
||||
static const double bi = -1.1069;
|
||||
static const double bq = 1.7046;
|
||||
|
||||
if (!cga_comp_mutex)
|
||||
cga_comp_mutex = thread_create_mutex();
|
||||
|
||||
if (is_cpu_thread)
|
||||
thread_wait_mutex(cga_comp_mutex);
|
||||
|
||||
current_cgamode = cgamode;
|
||||
|
||||
if (!new_cga) {
|
||||
min_v = chroma_multiplexer[0] + intensity[0];
|
||||
max_v = chroma_multiplexer[255] + intensity[3];
|
||||
@@ -170,6 +188,9 @@ update_cga16_color(uint8_t cgamode)
|
||||
video_bi = (int) (bi * iq_adjust_i + bq * iq_adjust_q);
|
||||
video_bq = (int) (-bi * iq_adjust_q + bq * iq_adjust_i);
|
||||
video_sharpness = (int) (sharpness * 256 / 100);
|
||||
|
||||
if (is_cpu_thread)
|
||||
thread_release_mutex(cga_comp_mutex);
|
||||
}
|
||||
|
||||
static uint8_t
|
||||
@@ -369,17 +390,41 @@ DecreaseSharpness(uint8_t cgamode)
|
||||
update_cga16_color(cgamode);
|
||||
}
|
||||
|
||||
void
|
||||
cga_comp_reload(int new_brightness, int new_saturation, int new_sharpness, int new_hue, int new_contrast)
|
||||
{
|
||||
if (!cga_comp_mutex)
|
||||
cga_comp_mutex = thread_create_mutex();
|
||||
|
||||
if (!is_cpu_thread)
|
||||
thread_wait_mutex(cga_comp_mutex);
|
||||
|
||||
brightness = new_brightness;
|
||||
contrast = new_contrast;
|
||||
saturation = new_saturation;
|
||||
sharpness = new_sharpness;
|
||||
hue_offset = new_hue;
|
||||
|
||||
update_cga16_color(current_cgamode);
|
||||
|
||||
if (!is_cpu_thread)
|
||||
thread_release_mutex(cga_comp_mutex);
|
||||
}
|
||||
|
||||
void
|
||||
cga_comp_init(int revision)
|
||||
{
|
||||
if (!cga_comp_mutex)
|
||||
cga_comp_mutex = thread_create_mutex();
|
||||
|
||||
new_cga = revision;
|
||||
|
||||
/* Making sure this gets reset after reset. */
|
||||
brightness = 0;
|
||||
contrast = 100;
|
||||
saturation = 100;
|
||||
sharpness = 0;
|
||||
hue_offset = 0;
|
||||
brightness = vid_cga_comp_brightness;
|
||||
contrast = vid_cga_comp_contrast;
|
||||
saturation = vid_cga_comp_saturation;
|
||||
sharpness = vid_cga_comp_sharpness;
|
||||
hue_offset = vid_cga_comp_hue;
|
||||
|
||||
update_cga16_color(0);
|
||||
}
|
||||
|
||||
@@ -457,6 +457,8 @@ compaq_cga_init(const device_t *info)
|
||||
|
||||
dev->crtc[9] = 13;
|
||||
|
||||
monitors[monitor_index_global].mon_composite = !!dev->composite;
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
|
||||
@@ -838,6 +838,8 @@ quadcolor_standalone_init(UNUSED(const device_t *info))
|
||||
break;
|
||||
}
|
||||
|
||||
monitors[monitor_index_global].mon_composite = !!quadcolor->composite;
|
||||
|
||||
return quadcolor;
|
||||
}
|
||||
|
||||
|
||||
@@ -1055,6 +1055,8 @@ v6355_standalone_init(const device_t *info) {
|
||||
break;
|
||||
}
|
||||
|
||||
monitors[monitor_index_global].mon_composite = (v6355->display_type == V6355_COMPOSITE);
|
||||
|
||||
return v6355;
|
||||
}
|
||||
|
||||
|
||||
@@ -719,4 +719,6 @@ pcjr_vid_init(pcjr_t *pcjr)
|
||||
else
|
||||
cga_palette = (display_type << 1);
|
||||
cgapal_rebuild();
|
||||
|
||||
monitors[monitor_index_global].mon_composite = !!pcjr->composite;
|
||||
}
|
||||
|
||||
@@ -334,6 +334,7 @@ video_prepare(void)
|
||||
video_inform_monitor(VIDEO_FLAG_TYPE_SPECIAL, &timing_default, i);
|
||||
|
||||
monitors[i].mon_interlace = 0;
|
||||
monitors[i].mon_composite = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -762,6 +762,8 @@ tandy_vid_init(tandy_t *dev)
|
||||
tandy_vid_in, NULL, NULL, tandy_vid_out, NULL, NULL, dev);
|
||||
|
||||
dev->vid = vid;
|
||||
|
||||
monitors[monitor_index_global].mon_composite = !!vid->composite;
|
||||
}
|
||||
|
||||
const device_config_t vid_config[] = {
|
||||
|
||||
Reference in New Issue
Block a user