Posted on

Playing Four Winds on a Touch Screen

Now that touch screens, especially on tablets and 2-in-1 devices like Surface Pro, have become common in Windows environment, and system based app-scaling for ultra-high resolution displays has greatly improved, allowing older applications to show decent size text and controls so that they can be accessed by touch, a vast range of native Windows desktop applications like Four Winds Mah Jong has become available in mobile context. Applications that a few years ago were labeled with the derogatory term “legacy” have gained revived interest, and not just for nostalgic reasons but because native Windows applications are often feature-rich and have depth and versatility that only a few “modern” or mobile-only apps have.

While it is clear that apps developed to fully utilize the features of mobile computing have a dimension that is not available for desktop software, the efforts seen by Microsoft to make a truly universal computing environment, combining the mobile and desktop, have begun to bear fruit. This post gives instructions on how to best use Four Winds with touch devices like 8- and 10-inch tablets and 2-in-1 computers running Windows 8.1 and 10 desktop operating systems.

Choosing optimal screen resolution, scaling value and view mode

Since version 8.1 Windows has offered improved app-scaling, which is crucial to allow older software run satisfactorily in ultra-high-dpi screen context. Which combination of screen resolution and scaling setting to use to get best results is not necessarily easily determined, and it is likely that settings need to be changed according to demands of different applications, but happily it is fast and easy to change the settings: to access the controls, right click on your Windows desktop and choose Display settings from the context menu that is shown, then experiment with different resolutions and scaling values. On the other hand, on Windows 10 devices that use traditional screen resolutions, it might be a better idea to lower native screen resolution and/or app scaling, or set an individual application to ignore app scaling.

Earlier versions of Windows let you change outlook of individual user interface elements like the size of the menu font, title bar and window borders. Since Windows 10 Creators Update the user interface for this feature has been removed but the feature itself is still supported, but you need to tweak the system registry to access the settings. Happily there is a free tool called Winaero Tweaker that lets you access these settings easily. While changing individual elements is usually not necessary (since system app scaling starting from Windows 8.1 normally works well), it may be necessary to tweak the size of the menu font, especially on small touch devices that only support regular screen resolutions (e.g. 1280 x 800). On these kinds of devices app-scaling does not always give big enough system font for touch control. But it is better to first try without any registry tweaks since app scaling on recent Windows 10 versions works most often really well.

Application-specific scaling is determined in the Compatibility tab of the program executable file. To access the the settings, click the Four Winds launch icon on Windows desktop with the right mouse button and choose Properties from the context menu. To have the application use the system’s app scaling, leave the “Override high DPI scaling behavior” box empty. To have the application use its internal app scaling, check the box, and then choose “Application” from the drop-down menu below. 

Four Winds supports a wide range of screen resolutions and layout options. When using a touch device, the goal is to find a combination of settings that make text and controls large enough to be easily accessible when using a finger. It is also meaningful to aim at full-screen game board to be able to cover the Windows taskbar and have tablet-like feel. To have keyboard input at hand when needed, it is also recommendable to run the system in Tablet mode (you can switch between the Tablet and Desktop mode by using the toggle button on the Windows Action Center – drag from the right edge to show it).

Four Winds running full-screen on a Windows 10 touch device: a low-end 8-inch Lenovo Miix 2 8 tablet using 1280 x 800 native screen with 125% app scaling. Four Winds runs using a compatibility setting that ignores system app scaling and applies internal app-scaling, instead, allowing the program to see the true system resolution and use its 1280 x 800 game boards with internally scaled system font and controls. Without the setting Four Winds would see the display as a 1024 x 640 screen, meaning that it could only use two possible game boards (Basic boards A and B), whereas ignoring the system app scaling it can also use Basic boards C and D, Integrated boards A, B and D, and Integrated Square boards N, O and P. Internal app-scaling works well because the device has low native screen resolution. While integrated game boards are available, the best touch experience can be achieved by choosing a basic board with big tiles and with separate view for discards (the Wall, player information and the Game Manager are available as separate windows).

Another example of Four Winds running full-screen on a Windows 10 touch device: Surface Pro 4 using 2736 x 1824 native screen with 200% app scaling. Here Four Winds has its internal app scaling turned off while using the Integrated Square R game board (1386 x 912 pixels) scaled by 200% so that full native resolution of Surface Pro can be utilized. This is the largest game board that Four Winds can use when app-scaling is allowed: without app-scaling it could use its larger game boards, but even the 1920 x 1200 pixels game boards would only cover about a quarter of the screen, and internally scaled text would at some parts appear far too big (where internal scaling is applied, but the surrounding elements stay unscaled). With app scaling Four Winds cannot necessarily utilize its internal high-resolution tile graphics but the system does upscaling so well that there is no noticeable difference.

Changing mouse- and keyboard-dependent settings and triggering mouse events with a touch

The default mouse configuration of Four Winds for making a discard is clicking a raised tile with the right (secondary) mouse button, which naturally does not work in touch environment. It is necessary to change the default:

  1. Choose File > Preferences.
  2. From the option tree, click General under the User Interface category.
  3. Check the Touch screen friendly option (the setting increases spacing of certain controls and makes hit control a bit looser to allow more relaxed touch control).
  4. Click the Game Controls button.
  5. Within the Mouse control group, change the configuration for Discarding to Click on raised tile, and uncheck the Extended confirmation area box.

Note that Windows emulates the mouse-over event in touch environment with tap-and-hold triggered drag gesture (and also with simple tap when the click event is not processed). E.g., you can display information about the available tiles and discards by tapping individual tiles, or by tapping a tile, holding the finger down a while, and dragging the finger over desired tiles. You can use this feature also to compensate the inaccuracy of finger-based pointing especially when accessing menus: instead of just tapping a menu command, you can tap and hold at any point of a drop-down menu and then drag to highlight menu items, and release when the correct menu command is selected.

Similarly, you can usually perform right mouse click by double tapping. E.g., you can display the context menu related to the Hands tab of the Game Manager by double tapping the list of hands, and the context menu related to the Moves tab by double tapping the list of moves.

Using accessibility features to work around problems with input

When you run Windows in tablet mode, the touch keyboard is normally automatically shown whenever keyboard input is expected, and the icon for manual launch is normally available in the system tray area of taskbar (if it is not, you can ensure that it is by right tapping the taskbar and checking Show touch keyboard button). But it is a good idea to pin the on-screen keyboard on the taskbar, just to ensure that keyboard is readily available also in Desktop mode. To do that, switch to Desktop mode, then click  Start > Settings > Ease of Access > On-Screen Keyboard. Once the keyboard is shown, right click (or tap and hold) to show the context menu and then choose Pin to taskbar.

You need a keyboard in Four Winds e.g. when saving games and entering input when customizing the rules. If you need to access the taskbar covered by Four Winds (either in Desktop mode  or Tablet mode, without having a keyboard and Ctrl+Esc command available), you can display the taskbar by moving the Four Winds window off the 0,0 screen position. Aternatively, you can make the taskbar to be automatically hidden, and then forcing it to be shown by sweeping from the bottom edge. To make the taskbar autohidden (and accordingly a control that can be forced to be shown), right click/tap on the taskbar in the desktop mode and choose Taskbar settings, then enable the options “Automatically hide the taskbar in desktop mode” and “Automatically hide the taskbar in tablet mode”.

Hint: You can reposition Four Winds easily at screen top left corner (0,0 coordinate) by double tapping the title bar (or by dragging the window near top left corner as it will be snapped to 0,0 when moved near the top left corner of the screen). This way you can have full-screen-sized Four Winds, moved off from 0,0 coordinate, to again cover the taskbar and fill the entire screen.

Another accessibility feature that can be useful to compensate shortcomings of desktop applications not designed for touch devices is having the magnifier available whenever needed. To have that, click Start > Settings > Ease of Access > Magnifier > Turn on Magnifier. You can determine the percentage of incremental magnification using the settings (often increment of 25% or less is adequate for temporary magnification). Once turned on, you can pin the Magnifier on the taskbar.



Posted on

Understanding App Scaling

In the recent years ultra high-resolution displays (called e.g. as “Retina”, “4K”, and “UHD”) have become more and more common. Starting from Windows 8.1, Windows has supported system-based app scaling that allows applications that do not provide internal support for ultra-high display resolutions to run in such environments without problems. By using app-scaling, the user can easily scale the apps according to their personal taste without needing to restart the system or log out and in to have the new setting in effect.


Earlier Windows operating systems allowed the user to make individual adjustments to standard windows components and screen fonts, making it possible to run applications on high-DPI devices where the text would be too small to be easily read. This would work reasonably well e.g. in situations where an 13-inch laptop would be run using a 1920 x 1080 or 1920 x 1280 screen resolution. But this method would be clearly inadequate when using ultra-high screen resolutions: not only the text but the applications themselves appear miniature-like (typically at quarter-size of what they are designed to be) and are practically non-usable unless they are scaled up.

Earlier versions of Four Winds supported internal scaling, and the program used an application manifest where it stated to be “high-dpi-aware”, telling the operating system that it would handle scaling-related tasks internally without operating system intervention. This results in Four Winds versions prior to 2.15 prohibiting the system from performing app-scaling, which in modern environment is normally undesired. (The internal manifest can be overridden by using a registry trick and creating an external manifest; but it is better to update the program to current version so that the desired effect can be achieved more easily.)

Starting from version 2.15 Four Winds no longer manifests itself as a “high-dpi-aware” application so by default it uses the app-scaling setting set by the system. This works well in most situations, and especially in ultra-high resolution environments, where the manufacturer has already set a recommended app-scaling value. To see (and change) the percentage of app scaling, right click on your Windows desktop and choose Display settings then under Scale and layout check  (or change) the current scaling percentage.


App scaling means that applications that do not claim to be “high-dpi-aware” do not see the true resolution of the display, but instead the non-scaled resolution. E.g., if your display uses 2560 x 2048 resolution and 200% app scaling, programs like Four Winds (starting from version 2.15) would see the system resolution as 1280 x 1024, and would accordingly allow using only game boards that fit in this screen size, and the system would scale this up by 200% so that screen size would be doubled both in width and height.

This is in most cases desirable. However, if you have an earlier Windows operating system (Windows 95/98, up to Windows 8; but not 8.1 or 10), and have a system that uses standard high-resolution display on a screen that is a bit small for such resolution (e.g., a 13-inch laptop where ideal dpi-value would be around 96, meaning resolutions like 1280 x 800 or 1336 x 786, etc.), you would probably prefer to use the old internal app scaling. The good news is that you can still have it by doing the following:

  1.  Right click on Four Winds Mah Jong icon on Windows desktop and choose Properties from the context menu (or in Start menu, under 4Winds folder, right click “Four Winds Mah Jong 2”, click More > Open file location, then right click Four Winds Mah Jong shortcut and choose Properties).
  2. In the Properties dialog box, activate the Compatibility tab and check Override high DPI scaling behavior, and from Scaling performed by Application drop-down list choose “Application”.

Using this setting allows Four Winds to internally enlarge fonts in menus, and make dialog boxes and other system controls bigger, behaving like versions prior to 2.15 did. On later Windows versions and especially when using ultra-high displays, this does not normally produce acceptable results so you would leave manual override compatibility setting turned off.

Because of complex combinations of display resolutions and physical screen sizes, you may need to experiment a while, using different screen resolutions and scaling factors (accessed by right clicking Windows desktop and choosing Display settings), until you find a combination that best works in your environment. The setting recommended by the manufacturer is often ideal quality-wise but may not be ideal as regards usability and legibility.

Posted on

Streaming Four Winds from a Windows Host

Streaming from Windows 10 Pro to Sony Xperia Z2.
Screenshot: Streaming from Windows 10 Pro to Sony Xperia Z2 using Android version of Microsoft Remote Desktop Client. Host: Dell XPS15 set at 1280×800, 150% App Scaling, Taskbar moved from bottom of the screen to the right edge. Client: 1920 x 1080px native screen, default Remote Desktop Client app settings, Four Winds set to be using Basic Board C at 1024 x 768px, auto-scaled to 1440 x 1080 by the RD client app. 

If you have installed Four Winds Mah Jong on Windows Pro or Enterprise, you can play the game on a Windows, Linux, macOS or iOS client by using free Remote Desktop App (or equivalent desktop client, included in the operating system). Or you can use a third-party app like Splashtop Personal, or Chrome Remote Desktop, to host the game on Windows Home computers, as well.

Normally the connection is created within a local area network (wired or wireless), but can be extended to WLAN connections. The experience especially within LAN is close to running a local app, and can ideally near the experience of using a native app on a non-Windows client. This post shows how to establish the connection.

When streaming within LAN, all native features of the game are accessible to all clients, including multiplayer games. You can play the game with your family e.g. by using mixed devices, e.g. Windows/macOS/Linux laptops, iPads and Android tablets (or even, if only barely, large-screen mobile phones, as shown in the screenshot above).

Using Windows Remote Desktop Connection (requires Windows Pro or Enterprise)

  1. The easiest way to set up the hosting computer is to download Microsoft Remote Desktop Assistant at If you use the assistant, you get easily the IP address that you need to establish the connection from the client side. An alternative method would be setting up the remote connection manually. In recent versions of Windows 10 you can do this from Settings > System > Remote Desktop, where you can access the related settings like turning off the automatic sleep mode. On older systems, the easiest method to establish remote desktop connections is to right click the My Computer icon on the Windows Desktop, choose Properties and then the Remote tab (this can still be accessed on Windows 10 Control Panel by clicking System > Advanced system settings > Remote.
  2. If you use Linux or macOS computer, or iOS, Android or Windows Mobile device, open the Remote Desktop app (available for free from Microsoft Store, Google Play, or App Store), and add your remote PC. Select the remote PC, and then wait for the connection to complete. An alternative method would be using the Remote Desktop Connection desktop interface  (it can normally be located by searching “Remote Desktop Connection” from the Start Menu Search box, but if not, it resides in C:\Windows\System32\mstsc.exe). The app has the benefit of supporting better display scaling (useful especially if either of your computers uses 4K or very high-resolution display but the other does not).
  3. You can extend the Remote Desktop to operate across the Internet, but this requires setting up port forwarding on your router, or using VPN. Please check instructions at

Using Splashtop Personal

  1. Go to to download and install the Windows XP, 7, 8 or 10 host (“Spashtop Streamer”) on the computer where you have Four Winds Mah Jong installed, and a client app for Windows XP, 7, 7 or 10, Windows Mobile, Mac OS X / macOS, iOS (iPhone and iPad), Android or Kindle Fire to be installed on your client device.
  2. Follow the instructions for creating a Splashtop account and setting up the apps.
  3. You can use Splashtop Personal free within LAN. At an extra annual charge, you can extend the connection to operate across the Internet.

Video capture on running Four Winds on iPad using Splashtop Personal

Other methods

Chrome Remote Desktop allows streaming across the Internet between any two devices running Chrome browser. There may be issues with the sound but otherwise the connection seems to be operational.




Posted on

Setting up Wine on macOS (High) Sierra to run Four Winds Mah Jong

Recent developments in virtualization, emulation and techniques that allow running of applications developed for “foreign” platforms as if they were native ones, have made it relatively easy, and often free, to use the same app in mixed environments.

This post takes a closer look on one of this techniques, namely Wine (acronym for “Wine Is Not an Emulator”), that allows running native Windows software on POSIX-compliant operating systems, such as Linux, macOS, & BSD, without need for a Windows license.

Here we install the game on macOS Sierra / High Sierra (the screenshots are from Sierra).

  1. First you need to allow your system to install apps from “App Store and identified developers” (or possibly “Anyone”, depending on what else needs to be installed other than XQuartz and Wine). Earlier macOS versions let you alter the default setting (that allows apps only from the App Store) by setting the Gatekeeper option under System Preferences > Security & Privacy > General, but High Sierra hides the other two options and you need to enable them by opening the Terminal (in Finder, click Go > Utilities and open Terminal), and type the following (you need to enter your user password to be able to change the setting):
sudo spctl --master-disable
  1. After this you can go and change the Gatekeeper setting.
  2. Go to  and read the introductory text, if you are not familiar with the concept of Wine, then go to to read installation instructions specific to macOS.
  3. You first need to have XQuartz 2.7.7. (or later) installed. Visit to download it. Click the .pkg file in Downloads to mount the installer, then launch it to go through the installation.
  4. After having installed XQuartz, download Wine at (version 2.21 “Wine Staging” is a good choice):
  5. Download the .pkg file, click it in Downloads to mount the installer, then launch it to start the installation. During the installation, you may be interrupted by prompts to install support for Mono (for .NET applications) and Gecko (for apps that use HTML internally). Accept to install these support packages.
  6. After the installation is complete, you can go to and download the latest version of Four Winds Mah Jong. Once downloaded, click the executable setup package (normally 4W2Full24.exe) in Downloads. It will automatically be launched in Wine and installed in correct location. A Windows shortcut is placed on the desktop, but it naturally does not work. You need to replace it with a Mac alias.
  7. Open your Home folder (in Finder, click Go > Home or press Cmd+Shift+H). Now make hidden files and folders visible by pressing Cmd+Shift+. (dot). This shows the hidden .wine folder where your Windows environment is installed:
  8. Double click the .wine folder and open folders until you have 4Winds2 folder open (the folder path relative to .wine is, as shown in the image below: drive_c > Program Files > 4Winds2:
  9. Here, click with the secondary mouse button on 4Winds2.exe to create an alias, then drag and drop it on your desktop.
  10. Launch Four Winds by double clicking the alias.
  11. Once launched, go to File > Preferences, and under User Interface > General option page (accessed by the category tree on the left), disable color management by clearing the check mark from the Use color management option:

    In earlier versions of Wine, and possibly on earlier macOS versions, you may also need to Bypass DirectX sound (under the same option page), and choose a MIDI file (on the Themes option page) for background music (DirectX allows using .mp3 files).

  12. If you have a one-button mouse, click the Game Controls button, then change the mouse control setting for discarding from “Right click on  raised tile” to “Click on raised tile”.
  13. Close the Preferences dialog box and click Help > Register to enter your registration name and number. Then choose Game > New Game to start a new game with preferred rules.
  14. You may want to test with different game boards by using the options under the View > Game boards sub menu to find the board size and layout that works best on your screen. Note that the quality of graphics is mediocre compared to the original but looks slightly better on boards that have not been scaled. If you choose a 24-bit theme, scaling has a better quality: e.g., for the default graphics, choose File > Preferences, then under User Interface > Themes, choose “Four Winds (24-bit)”.

And there you are, running Four Winds Mah Jong on your Mac, without needing a Windows license. The quality is not as good as when using VMWare or VirtualBox (both free), or Parallels Desktop, not to mention running the game on real Windows on a BootCamp partition, but at least you can now play proper Mahjong with multitude of rule options offline on your Mac.