8 years agoTAGS.txt: New tag: gens-qt4-RecentRoms-v0 gens-qt4-RecentRoms-v0
David Korth [Wed, 30 Mar 2011 19:45:10 +0000 (15:45 -0400)] 
TAGS.txt: New tag: gens-qt4-RecentRoms-v0

8 years ago[gens-qt4] actions/GensActions.cpp: Implemented Recent ROMs loading.
David Korth [Wed, 30 Mar 2011 19:43:07 +0000 (15:43 -0400)] 
[gens-qt4] actions/GensActions.cpp: Implemented Recent ROMs loading.

EmuManager::openRom(): Added a z_filename parameter, which allows
specifying the internal filename for multi-file archives.
This is used for loading Recent ROMs.

GensWindow::openRom(): Added a wrapper for the openRom() overload
that specifies filename and z_filename.

8 years ago[gens-qt4] RecentRoms::getRom(): Added a function to get a RecentRom_t entry based...
David Korth [Wed, 30 Mar 2011 19:31:50 +0000 (15:31 -0400)] 
[gens-qt4] RecentRoms::getRom(): Added a function to get a RecentRom_t entry based on Recent ROM ID.

Note tha the Recent ROM IDs start at 1, not 0.

If an invalid ID is specified, an empty RecentRom_t will be returned.

8 years ago[gens-qt4] RecentRomsMenuPrivate::update(): Uncomment the filename appending code.
David Korth [Wed, 30 Mar 2011 19:22:09 +0000 (15:22 -0400)] 
[gens-qt4] RecentRomsMenuPrivate::update(): Uncomment the filename appending code.

This was disabled for debugging, but I accidentally committed it
in commit 28a173e4ab2bffb7f6675d86f8c910fb8f4216cd.
([gens-qt4] actions/RecentRomsMenu.cpp: Emit a signal when an item is selected.)

8 years ago[gens-qt4] actions/RecentRomsMenu.cpp: Emit a signal when an item is selected.
David Korth [Wed, 30 Mar 2011 19:10:30 +0000 (15:10 -0400)] 
[gens-qt4] actions/RecentRomsMenu.cpp: Emit a signal when an item is selected.

GensKeyConfig.cpp: Assign shortcut keys to the Recent ROMs menu items.
A new menu ID has been allocated for the Recent ROMs submenu,

RecentRomsMenu uses a signal mapper to map the Recent ROM
items to a single signal, triggered(int).

GensMenuBarPrivate::init(): Connect recentRomsMenu::triggered(int)
to q->menuItemSelected(int).

8 years ago[gens-qt4] actions/RecentRomsMenu.cpp: New class for displaying the RecentRoms class.
David Korth [Wed, 30 Mar 2011 18:46:37 +0000 (14:46 -0400)] 
[gens-qt4] actions/RecentRomsMenu.cpp: New class for displaying the RecentRoms class.

RecentRomsMenu inherits from QMenu, and displays the RecentRoms
entries using menu items.

actions/GensMenuBar_menus.cpp: Added a "Recent ROMs" entry.

ui/resources/oxygen/*/document-open-recent.png: Added icons for "Recent ROMs".

Config/RecentRoms.hpp: Added a function romList() to allow read-only
access to the Recent ROMs list. This function is used by the
RecentRomsMenu class.

actions/GensMenuBar*.?pp: Updated for Recent ROMs menu synchronization.
The GensMenuBar class now has an instance of RecentRomsMenu, and this
menu is always added to the IDM_FILE_RECENT action as a submenu.

GensMenuBarPrivate::syncRecent(): This function disables the "Recent ROMs"
menu item if there's no ROMs in the list, and enables it if there is at
least one ROM in the list.

TODO: Implement Recent ROM selection functionality. Currently, selecting
an item from the Recent ROMs list doesn't do anything. It should load
the associated ROM image.

8 years ago[gens-qt4] Config/RecentRoms.cpp: ROM entries in the settings file should start with...
David Korth [Wed, 30 Mar 2011 18:45:20 +0000 (14:45 -0400)] 
[gens-qt4] Config/RecentRoms.cpp: ROM entries in the settings file should start with 1, not 0.

This matches the menu items, which start with 1, and it also matches
the hotkeys, which start with Ctrl+1.

8 years ago[gens-qt4] actions/GensMenuBar*.?pp: Created a private class for GensMenuBar's intern...
David Korth [Wed, 30 Mar 2011 18:02:40 +0000 (14:02 -0400)] 
[gens-qt4] actions/GensMenuBar*.?pp: Created a private class for GensMenuBar's internal variables.

This required restructing a lot of the GensMenuBar code.

The private class is declared in GensMenuBar_p.hpp, since
GensMenuBar_sync.cpp accesses some of the private variables
and implements some of the private functions.

8 years ago[gens-qt4] Config/RecentRoms.cpp: Initial "Recent ROMs" class.
David Korth [Wed, 30 Mar 2011 16:45:44 +0000 (12:45 -0400)] 
[gens-qt4] Config/RecentRoms.cpp: Initial "Recent ROMs" class.

This class manages the "Recent ROMs" function. Currently, it supports
updating an internal list of ROMs, and can load and save information
to/from a QSettings file.

EmuManager::openRom(const QString& filename): Update the Recent ROMs
list when a ROM is opened.

TODO: Don't do this if the ROM couldn't be loaded.

8 years ago[libgens] VdpIo::Set_Reg(): Use a table of scroll plane sizes instead of switch/case.
David Korth [Tue, 22 Mar 2011 14:01:40 +0000 (10:01 -0400)] 
[libgens] VdpIo::Set_Reg(): Use a table of scroll plane sizes instead of switch/case.

MD/VdpIo.hpp: Marked Scroll_Size_t as private.

8 years ago[libgens] MD/VdpIo.cpp: Minor optimizations to VDP_Ctrl_t.
David Korth [Mon, 14 Mar 2011 06:34:08 +0000 (02:34 -0400)] 
[libgens] MD/VdpIo.cpp: Minor optimizations to VDP_Ctrl_t.

- Flag renamed to ctrl_latch; changed from unsigned int to bool.

- Added comments indicating what ctrl_latch does.

- Access and Address are now uint16_t.

- Removed Write. This field wasn't used anywhere except Reset().

- DMA_Mode and DMA are now uint8_t.

- VDP_Ctrl_t and VDP_Ctrl are now private members of VdpIo.

8 years ago[libgens] MD/VdpIo.cpp: New enum VDEST_t.
David Korth [Mon, 14 Mar 2011 04:21:29 +0000 (00:21 -0400)] 
[libgens] MD/VdpIo.cpp: New enum VDEST_t.

This enum is used to indicate the internal VDP destination value.
Previously, hard-coded "magic numbers" were used.

This makes it easier to figure out what the VDP access value actually
means. Some comments regarding unknown access values have been fixed
to indicate what they mean, thanks to the new VDEST_t enum.

MD/VdpIo_static.hpp: Updated CD_Table[] to use VDEST_t values
instead of hard-coded "magic numbers".

8 years ago[gens-qt4] KeyHandlerQt::devHandler(): Fixed the Win32 build.
David Korth [Sun, 13 Mar 2011 06:17:19 +0000 (01:17 -0500)] 
[gens-qt4] KeyHandlerQt::devHandler(): Fixed the Win32 build.

This bug was reported by FraGag in #GensGS.

8 years ago[gens-qt4] translations/*.ts: Updated the translation files using lupdate.sh.
David Korth [Sat, 12 Mar 2011 21:44:13 +0000 (16:44 -0500)] 
[gens-qt4] translations/*.ts: Updated the translation files using lupdate.sh.

gens-qt4_en.ts, gens-qt4_en_GB.ts: Marked all new strings as translated.

8 years ago[gens-qt4] CtrlConfigPrivate::Def_CtrlKeys[][]: Fixed a compile failure on Mac OS X.
David Korth [Sat, 12 Mar 2011 21:39:12 +0000 (16:39 -0500)] 
[gens-qt4] CtrlConfigPrivate::Def_CtrlKeys[][]: Fixed a compile failure on Mac OS X.

This failure was noticed by the lupdate tool.

8 years agoTAGS.txt: New tag: gens-qt4-CtrlConfig-v0 gens-qt4-CtrlConfig-v0
David Korth [Sat, 12 Mar 2011 21:21:18 +0000 (16:21 -0500)] 
TAGS.txt: New tag: gens-qt4-CtrlConfig-v0

8 years ago[gens-qt4] Removed the "CtrlTest" menu and all associated functions.
David Korth [Sat, 12 Mar 2011 21:18:22 +0000 (16:18 -0500)] 
[gens-qt4] Removed the "CtrlTest" menu and all associated functions.

Added a new "Options" menu, which currently contains a single item,
"&Controllers...". This menu item opens the CtrlConfigWindow.

TODO: Implement load/save in CtrlConfigWindow using the CtrlConfig class.

8 years ago[gens-qt4] IO/IoMegaMouse.cpp: Use the keymap instead of hard-coding the mouse button...
David Korth [Sat, 12 Mar 2011 21:11:57 +0000 (16:11 -0500)] 
[gens-qt4] IO/IoMegaMouse.cpp: Use the keymap instead of hard-coding the mouse button mappings.

TODO: Add relative axis support.

8 years ago[libgens] IO/Io?Button.cpp: Removed the default keymaps.
David Korth [Sat, 12 Mar 2011 21:09:51 +0000 (16:09 -0500)] 
[libgens] IO/Io?Button.cpp: Removed the default keymaps.

8 years ago[gens-qt4] CtrlConfigPrivate::Def_CtrlKeys[]: Fixed Player 2's default keys.
David Korth [Sat, 12 Mar 2011 21:04:56 +0000 (16:04 -0500)] 
[gens-qt4] CtrlConfigPrivate::Def_CtrlKeys[]: Fixed Player 2's default keys.

The keymap is in physical controller order, which is (BCAS) for 3-button
controllers. Reorder the keys such that 'R', 'T', 'Y', and 'U' map
to (ABCS) instead of (BCAS).

8 years ago[gens-qt4] EmuManager.cpp: Clear the CtrlConfig dirty flag after updating the control...
David Korth [Sat, 12 Mar 2011 21:03:57 +0000 (16:03 -0500)] 
[gens-qt4] EmuManager.cpp: Clear the CtrlConfig dirty flag after updating the controller configuration.

8 years ago[gens-qt4] CtrlConfig::updateSysPort(): updatePort1() now supports both Port 1 and...
David Korth [Sat, 12 Mar 2011 21:03:26 +0000 (16:03 -0500)] 
[gens-qt4] CtrlConfig::updateSysPort(): updatePort1() now supports both Port 1 and Port 2.

The selected port is specified as the new "port" parameter.

TODO: Team Player / 4-Way Play support.

EmuManager.cpp: Use CtrlConfig::updateSysPort().
Update Port 2 in addition to Port 1.

8 years ago[gens-qt4] CtrlConfig::load(): Make sure ctrlTypes[i] is set if ctrlType_tmp is valid.
David Korth [Sat, 12 Mar 2011 21:00:21 +0000 (16:00 -0500)] 
[gens-qt4] CtrlConfig::load(): Make sure ctrlTypes[i] is set if ctrlType_tmp is valid.

Otherwise, controller configuration is only initialized properly if
there's no controller configuration to begin with (i.e. defaults
are used).

8 years ago[gens-qt4] Config/CtrlConfig.cpp: Added defaults for Port 1 and Port 2.
David Korth [Sat, 12 Mar 2011 20:53:31 +0000 (15:53 -0500)] 
[gens-qt4] Config/CtrlConfig.cpp: Added defaults for Port 1 and Port 2.

Port 1 defaults to a 6-button gamepad.
Port 2 defaults to a 3-button gamepad.

TODO: Come up with better default keymappings.

CtrlConfigPrivate::load(): If an entry isn't found (or the type is
invalid), a default controller type and keymap will be used.
The default types and keymaps are stored in
CtrlConfigPrivate::Def_CtrlTypes[] and CtrlConfigPrivate::Def_CtrlKeys[].

8 years ago[gens-qt4] CtrlConfig::updatePort1(): Set the controller keymap.
David Korth [Sat, 12 Mar 2011 20:39:27 +0000 (15:39 -0500)] 
[gens-qt4] CtrlConfig::updatePort1(): Set the controller keymap.

8 years ago[libgens] IoBase::setKeymap(), IoBase::keymap(): New functions to set and get the...
David Korth [Sat, 12 Mar 2011 20:39:03 +0000 (15:39 -0500)] 
[libgens] IoBase::setKeymap(), IoBase::keymap(): New functions to set and get the controller keymaps.

8 years ago[gens-qt4] CtrlConfig::save(): Don't remove empty port/keys entries.
David Korth [Sat, 12 Mar 2011 20:37:27 +0000 (15:37 -0500)] 
[gens-qt4] CtrlConfig::save(): Don't remove empty port/keys entries.

Removing them and readding them later results in the port/keys entries
being added to the bottom of the file instead of immediately after their
respective port/type entries. So, just add the blank entries in order to
maintain the correct ordering in the configuration file.

8 years ago[gens-qt4] CtrlConfig::updatePort1(): Accept a pointer to a LibGens::IoBase*.
David Korth [Sat, 12 Mar 2011 20:27:39 +0000 (15:27 -0500)] 
[gens-qt4] CtrlConfig::updatePort1(): Accept a pointer to a LibGens::IoBase*.

This makes it easier to update the original variable if we need to
create a new IoBase object.

8 years ago[gens-qt4] Config/CtrlConfig.?pp: Forgot to add this in the previous commit.
David Korth [Sat, 12 Mar 2011 20:25:18 +0000 (15:25 -0500)] 
[gens-qt4] Config/CtrlConfig.?pp: Forgot to add this in the previous commit.

Missed these files in commit c6c3645ff9282f402f83186f24abf2143286cdcc.
([gens-qt4] Initial reworking to use CtrlConfig for controller configuration.)

8 years ago[gens-qt4] Initial reworking to use CtrlConfig for controller configuration.
David Korth [Sat, 12 Mar 2011 20:15:04 +0000 (15:15 -0500)] 
[gens-qt4] Initial reworking to use CtrlConfig for controller configuration.

EmuManager::doCtrlChange(): Temporarily disabled.
This function will be removed once regular controller configuration
is working correctly.

EmuManager: Update the EmuContext controller ports on ROM load
and after every frame if the configuration is marked as dirty.

CtrlConfig: Added an enum for controller port numbers.
Added functions to load and save configuration from a QSettings object.

CtrlConfigWindow: Use CtrlConfig's new enum for controller port numbers
and MAX_BTNS value for the maximum number of buttons.

GensConfig: Added m_ctrlConfig, a CtrlConfig instance.
m_ctrlConfig->save() is called in save(), and
m_ctrlConfig->load() is called in reload().
TODO: Make it private?

Currently, the controller type value is loaded from the configuration
file. Keymapping is still hard-coded. Loading the keymap from the
configuration file is the next step in implementing the regular
controller configuration system.

8 years ago[gens-qt4] KeyHandlerQt::QKeyEventToKeyVal(): Fixed arrow keys on Mac OS X.
David Korth [Sat, 12 Mar 2011 19:46:53 +0000 (14:46 -0500)] 
[gens-qt4] KeyHandlerQt::QKeyEventToKeyVal(): Fixed arrow keys on Mac OS X.

Arrow keys are considered part of the numeric keypad on Mac OS X.
Mac OS X doesn't have a concept of Num Lock, so just hard-code
the arrow keys as special-cases of Qt::KeypadModifier.

This bug was reported by andlabs in #retro.

8 years ago[gens-qt4] CtrlConfigWindow.cpp: Initial UI support for EA 4-Way Play.
David Korth [Sat, 12 Mar 2011 04:45:36 +0000 (23:45 -0500)] 
[gens-qt4] CtrlConfigWindow.cpp: Initial UI support for EA 4-Way Play.

It's a bit of a hack due to the two devices (slave/master).

TODO: Use the combo box item's data field for storing the I/O type.

8 years ago[libgens] IO/Io*.?pp: Explicitly specify "void" parameters in the reset() functions.
David Korth [Fri, 11 Mar 2011 19:29:18 +0000 (14:29 -0500)] 
[libgens] IO/Io*.?pp: Explicitly specify "void" parameters in the reset() functions.

Affects Io6Button, IoMegaMouse, Io4WPMaster, and Io4WPSlave.

This shouldn't have any actual effect on the resulting binary.
I just prefer having "void reset(void)" instead of "void reset()",
even though C++ specifies that they're the same. (In C, lack of
parameters indicates that the function could take anything, so
to explicitly state no parameters, "void" must be specified.)

8 years ago[libgens] IO/Io*.?pp: Marked the read data/ctrl functions and zomgSaveMD() as const.
David Korth [Fri, 11 Mar 2011 19:26:37 +0000 (14:26 -0500)] 
[libgens] IO/Io*.?pp: Marked the read data/ctrl functions and zomgSaveMD() as const.

IoMegaMouse::readData(): Moved the latchMouseMovement() call to
IoMegaMouse::writeData(). This is required in order to mark readData()
as constant, and it's more accurate, since the mouse doesn't know when
the M68K reads the data lines on the controller port.

Also, it's more resilient in the case of games that incorrectly read
the data port more than once without incrementing the mouse's counter,
since it will only latch when the counter hits 1 instead of latching
every time the data port is read when the counter equals 1.

8 years ago[libgens] IO/IoBase.hpp: Moved the inline data and control line functions outside...
David Korth [Fri, 11 Mar 2011 19:20:07 +0000 (14:20 -0500)] 
[libgens] IO/IoBase.hpp: Moved the inline data and control line functions outside of the class definition.

8 years ago[libgens] IO/Io*.?pp: Removed the no-parameter constructor.
David Korth [Fri, 11 Mar 2011 19:05:51 +0000 (14:05 -0500)] 
[libgens] IO/Io*.?pp: Removed the no-parameter constructor.

Instead, always use IoBase::IoBase(const IoBase *other).

If other is NULL, the constructor will act like the old
IoBase::IoBase() constructor.

Removed the virtual keyword from all IoBase subclasses.
Only the IoBase functions need to be marked as virtual.
The subclasses won't be subclassed any further, so they
don't need their own vtables.

8 years ago[libgens] Io6Button::Io6Button(): Don't initialize m_buttons.
David Korth [Thu, 10 Mar 2011 21:49:33 +0000 (16:49 -0500)] 
[libgens] Io6Button::Io6Button(): Don't initialize m_buttons.

m_buttons is already initialized in IoBase::IoBase().

8 years ago[libgens] IoBase::IoBase(const IoBase *other): If NULL is specified, initialize defau...
David Korth [Thu, 10 Mar 2011 21:49:08 +0000 (16:49 -0500)] 
[libgens] IoBase::IoBase(const IoBase *other): If NULL is specified, initialize default settings.

8 years ago[gens-qt4] Moved GensConfig.cpp to Config/GensConfig.cpp.
David Korth [Thu, 10 Mar 2011 21:28:19 +0000 (16:28 -0500)] 
[gens-qt4] Moved GensConfig.cpp to Config/GensConfig.cpp.

I will start working on another configuration object, CtrlConfig.cpp,
which will be used to handle controller configuration.

8 years ago[gens-qt4] Converted KeyHandlerQt to a regular class.
David Korth [Thu, 10 Mar 2011 21:07:57 +0000 (16:07 -0500)] 
[gens-qt4] Converted KeyHandlerQt to a regular class.

This should make it easier to implement more input devices, such as
multiple keyboards and gamepads.

8 years ago[gens-qt4] GensCtrlCfgWidgetPrivate::setIoType(): Use the IoBase static functions...
David Korth [Wed, 9 Mar 2011 21:28:57 +0000 (16:28 -0500)] 
[gens-qt4] GensCtrlCfgWidgetPrivate::setIoType(): Use the IoBase static functions instead of the virtual functions.

It takes up slightly more lines of code, but ends up being a bit more
efficient, since we don't have to create a new device object.

8 years ago[libgens] IO/IoBase.hpp: Reworked the DevType(), NumButtons(), and NextLogicalButton...
David Korth [Wed, 9 Mar 2011 21:21:47 +0000 (16:21 -0500)] 
[libgens] IO/IoBase.hpp: Reworked the DevType(), NumButtons(), and NextLogicalButton() functions into static functions.

The virtual functions are still there, but they're merely wrappers
for the static functions.

This should make it easier to access controller information without
having to create new instances of the device classes.

8 years ago[gens-qt4] widgets/GensCtrlCfgWidget.cpp: Implemented the "Clear All Buttons" function.
David Korth [Wed, 9 Mar 2011 16:16:35 +0000 (11:16 -0500)] 
[gens-qt4] widgets/GensCtrlCfgWidget.cpp: Implemented the "Clear All Buttons" function.

New private slot GensCtrlCfgWidget::clearAllButtons() that wraps around

This private slot is connected to the m_btnCfg[]->clicked() signals.

8 years ago[gens-qt4] widgets/GensCtrlCfgWidget.cpp: Renamed "Reset All Buttons" to "Clear All...
David Korth [Wed, 9 Mar 2011 16:14:35 +0000 (11:14 -0500)] 
[gens-qt4] widgets/GensCtrlCfgWidget.cpp: Renamed "Reset All Buttons" to "Clear All Buttons".


8 years ago[gens-qt4] widgets/GensCtrlCfgWidget.cpp: Added "Change All Buttons" and "Reset All...
David Korth [Wed, 9 Mar 2011 08:22:09 +0000 (03:22 -0500)] 
[gens-qt4] widgets/GensCtrlCfgWidget.cpp: Added "Change All Buttons" and "Reset All Buttons" buttons.

These buttons are always shown at the bottom of the GensCtrlCfgWidget.

ui/CtrlConfigWindow.ui: Removed vspcBtnCfg (the spacer below the GensCtrlCfgWidget
in grpBtnCfg). GensCtrlCfgWidget has its own spacer item, which it previously
used to ensure all the buttons were together, and now also uses to ensure the
two new buttons are placed at the bottom of the widget.

8 years ago[gens-qt4] GensQApplication: Moved translation initialization from gqt4_main to GensQ...
David Korth [Tue, 8 Mar 2011 15:19:56 +0000 (10:19 -0500)] 
[gens-qt4] GensQApplication: Moved translation initialization from gqt4_main to GensQApplication.

GensQApplication now has a private class, GensQApplicationPrivate,
which is used to manage initialization and translationss.

8 years ago[gens-qt4] widgets/*.cpp: Disable the copy constructor of private classes.
David Korth [Tue, 8 Mar 2011 14:58:57 +0000 (09:58 -0500)] 
[gens-qt4] widgets/*.cpp: Disable the copy constructor of private classes.

Marked the internal q variable as private.

8 years agoui/resources/oxygen/: Added the input-gaming icon from the Oxygen icon theme.
David Korth [Tue, 8 Mar 2011 07:25:27 +0000 (02:25 -0500)] 
ui/resources/oxygen/: Added the input-gaming icon from the Oxygen icon theme.

This icon is used for the "CtrlConfig" menu item, and will also be used
for the final "Controller Configuration" menu item later on.

8 years ago[gens-qt4] GensCtrlCfgWidgetPrivate::setIoType(): Append a colon to the button names.
David Korth [Tue, 8 Mar 2011 07:20:46 +0000 (02:20 -0500)] 
[gens-qt4] GensCtrlCfgWidgetPrivate::setIoType(): Append a colon to the button names.

8 years ago[gens-qt4] widgets/GensCtrl???Widget.cpp: Specify a monospaced font instead of using...
David Korth [Tue, 8 Mar 2011 07:18:45 +0000 (02:18 -0500)] 
[gens-qt4] widgets/GensCtrl???Widget.cpp: Specify a monospaced font instead of using <tt></tt>.

Use the font "Monospace", and set the style hint to QFont::TypeWriter.

The latter is required on Windows, since "Monospace" doesn't refer to
anything on that platform. (It's probably also required on Mac OS X,
but I haven't tested it.)

8 years ago[gens-qt4] Split the translation compilation into a subproject.
David Korth [Mon, 7 Mar 2011 23:34:10 +0000 (18:34 -0500)] 
[gens-qt4] Split the translation compilation into a subproject.

Removed the translation update code from CMakeLists.txt, since it
was confusing and caused a lot of issues. Instead, a bash script
translations/lupdate.sh can be run from the translations/ subdirectory.

Translations are now stored in the build/src/gens-qt4/translations/
subdirectory instead of in build/src/gens-qt4/.

gqt4_main.cpp::gqt4_main(): Updated the gqt4_gensTranslator initialization
code to default to the "translations/" subdirectory within the application

TODO: Check a bunch of directories for both the Qt and Gens translations.

8 years ago[gens-qt4] CtrlConfigWindow::keyPressEvent(): Removed some debugging code that was...
David Korth [Mon, 7 Mar 2011 22:47:20 +0000 (17:47 -0500)] 
[gens-qt4] CtrlConfigWindow::keyPressEvent(): Removed some debugging code that was used to test layout direction changes.

8 years ago[gens-qt4] GensKeySequenceWidget::changeEvent(): Update the clear button icon in...
David Korth [Mon, 7 Mar 2011 22:47:04 +0000 (17:47 -0500)] 
[gens-qt4] GensKeySequenceWidget::changeEvent(): Update the clear button icon in response to layout direction changes.

8 years ago[gens-qt4] GensCtrlKeyWidget::changeEvent(): Updated the function comment.
David Korth [Mon, 7 Mar 2011 22:46:28 +0000 (17:46 -0500)] 
[gens-qt4] GensCtrlKeyWidget::changeEvent(): Updated the function comment.

8 years ago[gens-qt4] GensCtrlKeyWidget::changeEvent(): Removed a debugging #include <stdio.h>.
David Korth [Mon, 7 Mar 2011 22:45:42 +0000 (17:45 -0500)] 
[gens-qt4] GensCtrlKeyWidget::changeEvent(): Removed a debugging #include <stdio.h>.

8 years ago[gens-qt4] GensCtrlKeyWidget::changeEvent(): Update the clear button icon in response...
David Korth [Mon, 7 Mar 2011 22:42:59 +0000 (17:42 -0500)] 
[gens-qt4] GensCtrlKeyWidget::changeEvent(): Update the clear button icon in response to layout direction changes.

8 years ago[WTF] [gens-qt4] When blindly copypastaing changes, make sure you get the equality...
David Korth [Mon, 7 Mar 2011 22:39:42 +0000 (17:39 -0500)] 
[WTF] [gens-qt4] When blindly copypastaing changes, make sure you get the equality right.

I changed the changeEvent() check from != to == in a few windows, but not all
of them, resulting in epic failure. (The retranslate code was expecting ==,
so it was getting called for other events.)

8 years ago[gens-qt4] Pass the changeEvent() events to the base class even if it isn't a QEvent...
David Korth [Mon, 7 Mar 2011 22:35:32 +0000 (17:35 -0500)] 
[gens-qt4] Pass the changeEvent() events to the base class even if it isn't a QEvent::LanguageChange event.

8 years ago[gens-qt4] Pass the changeEvent() events to the base class after retranslating the UI.
David Korth [Mon, 7 Mar 2011 22:30:46 +0000 (17:30 -0500)] 
[gens-qt4] Pass the changeEvent() events to the base class after retranslating the UI.

8 years ago[gens-qt4] CtrlConfigWindow::updatePortButton(): Display the full port name in the...
David Korth [Mon, 7 Mar 2011 22:17:39 +0000 (17:17 -0500)] 
[gens-qt4] CtrlConfigWindow::updatePortButton(): Display the full port name in the tooltip in addition to the long device name.

8 years ago[gens-qt4] ui/CtrlConfigWindow.ui: Removed the tooltips for actionPort1 and actionPort2.
David Korth [Mon, 7 Mar 2011 22:12:07 +0000 (17:12 -0500)] 
[gens-qt4] ui/CtrlConfigWindow.ui: Removed the tooltips for actionPort1 and actionPort2.

The tooltips are changed at runtime to reflect the type of device
connected to the port, so these tooltips are never seen.

8 years ago[gens-qt4] ui/CtrlConfigWindow.ui: Set the default icon for the "Port 1" button.
David Korth [Mon, 7 Mar 2011 22:10:48 +0000 (17:10 -0500)] 
[gens-qt4] ui/CtrlConfigWindow.ui: Set the default icon for the "Port 1" button.

This is needed in order to make sure the toolbar has the expected height
in Qt Designer. If the icon wasn't present, the toolbar would only occupy
the height required for the button text.

8 years ago[libgens] Decompressor/unrar.h: Converted to Unix line endings.
David Korth [Mon, 7 Mar 2011 22:07:53 +0000 (17:07 -0500)] 
[libgens] Decompressor/unrar.h: Converted to Unix line endings.

8 years ago[gens-qt4] GensConfig::reload(): Default to "UnRAR64.dll" on Win64.
David Korth [Mon, 7 Mar 2011 22:06:35 +0000 (17:06 -0500)] 
[gens-qt4] GensConfig::reload(): Default to "UnRAR64.dll" on Win64.

I don't think I'm ever going to release a Win64 build, but just in case,
we should default to the 64-bit UnRAR64.dll, since the 32-bit UnRAR.dll
won't work.

8 years ago[gens-qt4] CtrlConfigWindow: Updated the icon for "None".
David Korth [Mon, 7 Mar 2011 21:29:40 +0000 (16:29 -0500)] 
[gens-qt4] CtrlConfigWindow: Updated the icon for "None".

The icon is a modified version of the previous icon. It now represents
a screwless DE-9, similar to the type of port actually found on the
Sega Genesis console.

The toolbar now shows 48x48 icons. This helps to reduce the amount of
wasted space when lots of Team Player devices are connected.

The "none" icon is now available in both 48x48 and 64x64. I rearranged
the gens/ icons directory a bit to use a directory hierarchy by size.

8 years ago[gens-qt4] widgets/GensCtrlKeyWidget.cpp: Don't clear the configured key if key recor...
David Korth [Mon, 7 Mar 2011 17:02:36 +0000 (12:02 -0500)] 
[gens-qt4] widgets/GensCtrlKeyWidget.cpp: Don't clear the configured key if key recording times out.

GensCtrlKeyWidget::doneRecording() -> GensCtrlKeyWidget::captureKeyTimeout()

8 years agoTAGS.txt: New tag: gens-qt4-CtrlConfigWindow-v2
David Korth [Mon, 7 Mar 2011 16:52:19 +0000 (11:52 -0500)] 
TAGS.txt: New tag: gens-qt4-CtrlConfigWindow-v2

I'll retroactively add gens-qt4-CtrlConfigWindow-v1 and
gens-qt4-CtrlConfigWindow-v0 later.

8 years ago[gens-qt4] widgets/GensCtrlKeyWidget.cpp: Minor formatting fixes. gens-qt4-CtrlConfigWindow-v2
David Korth [Mon, 7 Mar 2011 16:51:01 +0000 (11:51 -0500)] 
[gens-qt4] widgets/GensCtrlKeyWidget.cpp: Minor formatting fixes.

8 years ago[gens-qt4] GensCtrlKeyWidgetPrivate::updateShortcutDisplay(): Use LibGens::DevManager...
David Korth [Mon, 7 Mar 2011 16:50:10 +0000 (11:50 -0500)] 
[gens-qt4] GensCtrlKeyWidgetPrivate::updateShortcutDisplay(): Use LibGens::DevManager::KeyName(): to get the key name.

TODO: Move LibGens::DevManager::KeyName to the UI.

8 years ago[libgens] GensInput/DevManager.hpp: Marked the inline function definitions as inline.
David Korth [Mon, 7 Mar 2011 16:47:44 +0000 (11:47 -0500)] 
[libgens] GensInput/DevManager.hpp: Marked the inline function definitions as inline.

I forgot to do this in commit fab8fc39bcdc71d0c8553f5d606e61a0581a7085.
([libgens] GensInput/DevManager.hpp: Moved inline functions to outside of the class definition.)

8 years ago[libgens] GensInput::KeyName(): New function to get the name of a given Gens keycode.
David Korth [Mon, 7 Mar 2011 16:45:27 +0000 (11:45 -0500)] 
[libgens] GensInput::KeyName(): New function to get the name of a given Gens keycode.

TODO: Move to the UI for key name translation.

8 years ago[libgens] GensInput/DevManager.hpp: Moved inline functions to outside of the class...
David Korth [Mon, 7 Mar 2011 16:42:34 +0000 (11:42 -0500)] 
[libgens] GensInput/DevManager.hpp: Moved inline functions to outside of the class definition.

8 years ago[gens-qt4] GensCtrlCfgWidgetPrivate::~GensCtrlCfgWidgetPrivate(): Minor reordering...
David Korth [Mon, 7 Mar 2011 16:38:39 +0000 (11:38 -0500)] 
[gens-qt4] GensCtrlCfgWidgetPrivate::~GensCtrlCfgWidgetPrivate(): Minor reordering change.

8 years ago[gens-qt4] widgets/GensCtrlKeyWidget.cpp: Make sure the display label widget is unref...
David Korth [Mon, 7 Mar 2011 16:37:59 +0000 (11:37 -0500)] 
[gens-qt4] widgets/GensCtrlKeyWidget.cpp: Make sure the display label widget is unreferenced if it's destroyed.

Connect lblDisplay's destroyed() signal to a new slot, labelDestroyed().
This slot simply clears the d->lblDisplay variable.

8 years ago[gens-qt4] GensCtrlCfgWidgetPrivate::init(): Specify the display label in the GensCtr...
David Korth [Mon, 7 Mar 2011 16:33:08 +0000 (11:33 -0500)] 
[gens-qt4] GensCtrlCfgWidgetPrivate::init(): Specify the display label in the GensCtrlKeyWidget constructor.

8 years ago[gens-qt4] widgets/GensCtrlKeyWidget.cpp: Added a QLabel parameter to the constructor.
David Korth [Mon, 7 Mar 2011 16:32:43 +0000 (11:32 -0500)] 
[gens-qt4] widgets/GensCtrlKeyWidget.cpp: Added a QLabel parameter to the constructor.

8 years ago[libgens] DevManager::ms_KeyNames[]: Changed 0x00 from "Unknown" to "None".
David Korth [Mon, 7 Mar 2011 16:31:25 +0000 (11:31 -0500)] 
[libgens] DevManager::ms_KeyNames[]: Changed 0x00 from "Unknown" to "None".

TODO: Qt refers to Windows keys as "Meta",
but X11 refers to Windows keys as "Super".

8 years ago[gens-qt4] widgets/GensCtrlKeyWidget.cpp: New widget GensCtrlKeyWidget.
David Korth [Mon, 7 Mar 2011 16:27:31 +0000 (11:27 -0500)] 
[gens-qt4] widgets/GensCtrlKeyWidget.cpp: New widget GensCtrlKeyWidget.

This widget allows for single-key configuration, which is useful for
configuring controller buttons. In the future, it will also allow for
gamepad configuration.

This control requires a companion label in order to to display its status.

TODO: Display the actual key names instead of the key values.

Input/KeyHandlerQt.hpp: Changed QKeyEventToKeyVal and NativeModifierToKeyVal
from protected functions to public functions. GensCtrlKeyWidget makes
use of these functions.

widgets/GensCtrlCfgWidget.cpp: Use GensCtrlKeyWidget instead of

8 years ago[gens-qt4] translations/*.ts: Updated translations for disambiguation changes.
David Korth [Sun, 6 Mar 2011 21:37:21 +0000 (16:37 -0500)] 
[gens-qt4] translations/*.ts: Updated translations for disambiguation changes.

8 years ago[gens-qt4] GeneralConfigWindow.ui: Added disambiguation comments for the Color Scale...
David Korth [Sun, 6 Mar 2011 21:35:09 +0000 (16:35 -0500)] 
[gens-qt4] GeneralConfigWindow.ui: Added disambiguation comments for the Color Scale Method items.

8 years ago[gens-qt4] Marked OSD strings as OSD to disambiguate them from "regular" strings.
David Korth [Sun, 6 Mar 2011 21:28:58 +0000 (16:28 -0500)] 
[gens-qt4] Marked OSD strings as OSD to disambiguate them from "regular" strings.

The OSD currently only supports Unicode characters U+0000-U+00FF.

VBackend/VBackend.cpp: Translate the Fast Blur and Stretch Mode messages.

8 years ago[gens-qt4] translations/*.ts: Minor translation updates.
David Korth [Sun, 6 Mar 2011 21:08:55 +0000 (16:08 -0500)] 
[gens-qt4] translations/*.ts: Minor translation updates.

- Marked all strings in en and en_GB as completed.

- CtrlConfigWindow: Renamed Team Player buttons to MP-1A, MP-1B, etc.
  (Team Player is known as Multiplayer in Europe.)

- ja: Fixed punctuation warnings. (Colons should be after the
  accelerator key, not before.)

8 years ago[gens-qt4] translations/*.ts: Updated translations for UI namespace changes.
David Korth [Sun, 6 Mar 2011 20:54:15 +0000 (15:54 -0500)] 
[gens-qt4] translations/*.ts: Updated translations for UI namespace changes.

See commit 5ee52c324199effbaae97b5e1c4dbc04b4b48e59 for more information.
([gens-qt4] ui/*.ui: Moved all UI files to within the GensQt4 namespace.)

8 years ago[gens-qt4] ui/*.ui: Moved all UI files to within the GensQt4 namespace.
David Korth [Sun, 6 Mar 2011 20:25:03 +0000 (15:25 -0500)] 
[gens-qt4] ui/*.ui: Moved all UI files to within the GensQt4 namespace.

This will make it easier to handle translations, since both the UI file
and the C++ file(s) will show up under the same name in Qt Linguist.
Also, it means that strings used in both the UI file and the C++ file(s)
can be de-duplicated, saving disk space, memory, and translation time.

8 years ago[gens-qt4] McdControlWindow::McdControlWindow(): Uncomment the query() call.
David Korth [Sun, 6 Mar 2011 20:00:49 +0000 (15:00 -0500)] 
[gens-qt4] McdControlWindow::McdControlWindow(): Uncomment the query() call.

I commented this out while testing runtime language changes, but accidentally
committed the commented-out line in commit dfd230f2b3861910c1979b9b62a5fe4889e04efc.
([gens-qt4] Added changeEvent() functions to all windows to allow changing the language at runtime.)

8 years ago[gens-qt4] translations/gens-qt4_ja.ts: Removed a stray obsolete string.
David Korth [Sun, 6 Mar 2011 20:00:37 +0000 (15:00 -0500)] 
[gens-qt4] translations/gens-qt4_ja.ts: Removed a stray obsolete string.

8 years agoMerge branch 'initial-i18n'
David Korth [Sun, 6 Mar 2011 19:54:35 +0000 (14:54 -0500)] 
Merge branch 'initial-i18n'

Currently, three languages are available:

- en: US English (default)
- en_GB: British English (provided by Overlord)
- ja: Japanese (provided by Scarred Sun)

Note that strings are still subject to change, so these translations
are not to be considered final at this point.

8 years ago[gens-qt4] translations/gens-qt4_es.ts: Removed the empty Spanish translation file. initial-i18n github/initial-i18n
David Korth [Sun, 6 Mar 2011 19:53:34 +0000 (14:53 -0500)] 
[gens-qt4] translations/gens-qt4_es.ts: Removed the empty Spanish translation file.

I'll recreate the file once I get someone to start the Spanish translations.

8 years ago[gens-qt4] translations/gens-qt4_ja.ts: Updated obsolete strings.
David Korth [Sun, 6 Mar 2011 19:49:32 +0000 (14:49 -0500)] 
[gens-qt4] translations/gens-qt4_ja.ts: Updated obsolete strings.

- Removed colons from strings that no longer have them.

- Removed console names that don't have disambiguating strings.

- "Development Build" is still left in, even though it's now obtained
  from LibGens. I'll figure out how to translate it later.

8 years ago[gens-qt4] translations/: ja_JP -> ja
David Korth [Sun, 6 Mar 2011 19:39:31 +0000 (14:39 -0500)] 
[gens-qt4] translations/: ja_JP -> ja

Other programs use "ja" for Japanese, and there's no point in specifying a
specific region for a language that's primarily used in a single country.

8 years ago[gens-qt4] translations/: Updated translation files with the latest strings.
David Korth [Sun, 6 Mar 2011 19:38:37 +0000 (14:38 -0500)] 
[gens-qt4] translations/: Updated translation files with the latest strings.

8 years agoja-JP translation
Scarred Sun [Sun, 6 Mar 2011 19:37:30 +0000 (14:37 -0500)] 
ja-JP translation

approximately 2/3rds through

Signed-off-by: David Korth <gerbilsoft@verizon.net>
8 years ago[gens-qt4] GensCtrlCfgWidgetPrivate::init(): Added a vertical spacer at the bottom...
David Korth [Sun, 6 Mar 2011 17:46:00 +0000 (12:46 -0500)] 
[gens-qt4] GensCtrlCfgWidgetPrivate::init(): Added a vertical spacer at the bottom of the QGridLayout.

This ensures that the widgets are all placed together regardless of
controller type changes and/or window size changes.

8 years ago[gens-qt4] widgets/GensCtrlCfgWidget.cpp: New function GensCtrlCfgWidgetPrivate:...
David Korth [Sun, 6 Mar 2011 17:40:52 +0000 (12:40 -0500)] 
[gens-qt4] widgets/GensCtrlCfgWidget.cpp: New function GensCtrlCfgWidgetPrivate::ButtonName_l().

This function returns the localized version of a LibGens::IoBase::ButtonName_t.

GensCtrlCfgWidgetPrivate::setIoType(): Updated to use ButtonName_l().

8 years ago[libgens] IoBase::buttonName(): Return an enum value instead of a string.
David Korth [Sun, 6 Mar 2011 17:29:10 +0000 (12:29 -0500)] 
[libgens] IoBase::buttonName(): Return an enum value instead of a string.

This will make it easier to localize button names in the UI.

Updated all IoBase devices to return the correct values in buttonName().

Removed button functions from the TeamPlayer and 4WP devices,
since the devices themselves don't have any buttons.

TODO: Figure out a way to configure the TeamPlayer and 4WP devices later.

8 years ago[gens-qt4] Added changeEvent() functions to all windows to allow changing the languag...
David Korth [Sun, 6 Mar 2011 08:09:29 +0000 (03:09 -0500)] 
[gens-qt4] Added changeEvent() functions to all windows to allow changing the language at runtime.

The changeEvent() functions call retranslateUi(). Some windows have additonal
text that needs to be translated in addition to the text specified in the
UI files, so that text is also retranslated in the changeEvent() function.

actions/GensMenuBar.cpp: Added a retranslate() function to retranslate
all of the menu items. This function is called by GensWindow::changeEvent().

gqt4_main.cpp: gqt4_qtTranslator and gqt4_gensTranslator are now available
outside of the gqt4_main.cpp file. The UI language can be changed by calling
the load() function on both translators.

- Write a wrapper function to change the language on both translators.
- Add a UI to change the current language. (maybe in GeneralConfigWindow?)

8 years ago[gens-qt4] EmuManager::loadRom_int(): Use RomFormat() to get the ROM format strings.
David Korth [Sun, 6 Mar 2011 04:17:24 +0000 (23:17 -0500)] 
[gens-qt4] EmuManager::loadRom_int(): Use RomFormat() to get the ROM format strings.

8 years ago[gens-qt4] EmuManager::RomFormat(): New function to get a string identifying a ROM...
David Korth [Sun, 6 Mar 2011 04:14:23 +0000 (23:14 -0500)] 
[gens-qt4] EmuManager::RomFormat(): New function to get a string identifying a ROM format.

8 years ago[gens-qt4] EmuManager_str.cpp: Split the translatable string functions from EmuManage...
David Korth [Sun, 6 Mar 2011 04:08:23 +0000 (23:08 -0500)] 
[gens-qt4] EmuManager_str.cpp: Split the translatable string functions from EmuManager.cpp into a separate file.

They're still part of the EmuManager class, though I may create
another class for them later.

8 years ago[gens-qt4] EmuManager::loadRom_int(): Don't set m_rom = rom until emulation is fully...
David Korth [Sat, 5 Mar 2011 22:52:48 +0000 (17:52 -0500)] 
[gens-qt4] EmuManager::loadRom_int(): Don't set m_rom = rom until emulation is fully initialized.

This simplifies some of the code a bit.