Add menu items to scale windows up to 10x.
This commit is contained in:
parent
c654caed32
commit
176556dfd3
@ -258,7 +258,7 @@ void Snes9xWindow::connect_signals()
|
||||
toggle_ui();
|
||||
});
|
||||
|
||||
for (int i = 1; i <= 5; i++)
|
||||
for (int i = 1; i <= 10; i++)
|
||||
{
|
||||
std::string name = "exact_pixels_" + std::to_string(i) + "x_item";
|
||||
get_object<Gtk::MenuItem>(name.c_str())->signal_activate().connect([i, this] {
|
||||
|
@ -1793,6 +1793,51 @@
|
||||
<signal name="activate" handler="exact_5x" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="exact_pixels_6x_item">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">_6x</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="exact_6x" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="exact_pixels_7x_item">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">_7x</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="exact_7x" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="exact_pixels_8x_item">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">_8x</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="exact_8x" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="exact_pixels_9x_item">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">_9x</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="exact_9x" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="exact_pixels_10x_item">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">1_0x</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="exact_10x" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -528,16 +528,22 @@
|
||||
#define ID_WINDOW_SIZE_2X 40170
|
||||
#define ID_WINDOW_SIZE_3X 40171
|
||||
#define ID_WINDOW_SIZE_4X 40172
|
||||
#define ID_DEBUG_APU_TRACE 40173
|
||||
#define ID_EMULATION_BACKGROUNDINPUT 40174
|
||||
#define ID_SAVEMEMPACK 40175
|
||||
#define ID_INPUT_BACKGROUNDKEYBOARDHOTKEYS 40176
|
||||
#define ID_INPUT_DETECTGAMEPADCHANGES 40177
|
||||
#define ID_EMULATION_HACKS 40178
|
||||
#define ID_FILE_LOAD_PREVIEW 40179
|
||||
#define ID_FILE_SAVE_PREVIEW 40180
|
||||
#define ID_FILE_SAVE_POPUP 40181
|
||||
#define ID_FILE_LOAD_POPUP 40182
|
||||
#define ID_WINDOW_SIZE_5X 40173
|
||||
#define ID_WINDOW_SIZE_6X 40174
|
||||
#define ID_WINDOW_SIZE_7X 40175
|
||||
#define ID_WINDOW_SIZE_8X 40176
|
||||
#define ID_WINDOW_SIZE_9X 40177
|
||||
#define ID_WINDOW_SIZE_10X 40178
|
||||
#define ID_DEBUG_APU_TRACE 40179
|
||||
#define ID_EMULATION_BACKGROUNDINPUT 40180
|
||||
#define ID_SAVEMEMPACK 40181
|
||||
#define ID_INPUT_BACKGROUNDKEYBOARDHOTKEYS 40182
|
||||
#define ID_INPUT_DETECTGAMEPADCHANGES 40183
|
||||
#define ID_EMULATION_HACKS 40184
|
||||
#define ID_FILE_LOAD_PREVIEW 40185
|
||||
#define ID_FILE_SAVE_PREVIEW 40186
|
||||
#define ID_FILE_SAVE_POPUP 40187
|
||||
#define ID_FILE_LOAD_POPUP 40188
|
||||
#define ID_FILE_SAVE0 44000
|
||||
#define ID_FILE_SAVE_LAST 44100
|
||||
#define ID_FILE_LOAD0 44200
|
||||
@ -553,7 +559,7 @@
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 169
|
||||
#define _APS_NEXT_COMMAND_VALUE 40181
|
||||
#define _APS_NEXT_COMMAND_VALUE 40189
|
||||
#define _APS_NEXT_CONTROL_VALUE 3040
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
|
@ -1061,6 +1061,12 @@ BEGIN
|
||||
MENUITEM "&2x", ID_WINDOW_SIZE_2X,MFT_STRING,MFS_ENABLED
|
||||
MENUITEM "&3x", ID_WINDOW_SIZE_3X,MFT_STRING,MFS_ENABLED
|
||||
MENUITEM "&4x", ID_WINDOW_SIZE_4X,MFT_STRING,MFS_ENABLED
|
||||
MENUITEM "&5x", ID_WINDOW_SIZE_5X,MFT_STRING,MFS_ENABLED
|
||||
MENUITEM "&6x", ID_WINDOW_SIZE_6X,MFT_STRING,MFS_ENABLED
|
||||
MENUITEM "&7x", ID_WINDOW_SIZE_7X,MFT_STRING,MFS_ENABLED
|
||||
MENUITEM "&8x", ID_WINDOW_SIZE_8X,MFT_STRING,MFS_ENABLED
|
||||
MENUITEM "&9x", ID_WINDOW_SIZE_9X,MFT_STRING,MFS_ENABLED
|
||||
MENUITEM "1&0x", ID_WINDOW_SIZE_10X,MFT_STRING,MFS_ENABLED
|
||||
END
|
||||
MENUITEM MFT_SEPARATOR
|
||||
MENUITEM "&Stretch Image\tAlt+Backspace", ID_WINDOW_STRETCH,MFT_STRING,MFS_ENABLED
|
||||
|
@ -2099,6 +2099,12 @@ LRESULT CALLBACK WinProc(
|
||||
case ID_WINDOW_SIZE_2X:
|
||||
case ID_WINDOW_SIZE_3X:
|
||||
case ID_WINDOW_SIZE_4X:
|
||||
case ID_WINDOW_SIZE_5X:
|
||||
case ID_WINDOW_SIZE_6X:
|
||||
case ID_WINDOW_SIZE_7X:
|
||||
case ID_WINDOW_SIZE_8X:
|
||||
case ID_WINDOW_SIZE_9X:
|
||||
case ID_WINDOW_SIZE_10X:
|
||||
UINT factor, newWidth, newHeight;
|
||||
RECT margins;
|
||||
factor = (wParam & 0xffff) - ID_WINDOW_SIZE_1X + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user