rid[num].dwFlags = RIDEV_INPUTSINK;
rid[num].hwndTarget = mon->hMainWnd;
}
- rid[num].dwFlags |= (os_vista ? RIDEV_DEVNOTIFY : 0);
+ rid[num].dwFlags |= RIDEV_DEVNOTIFY;
}
num++;
rid[num].dwFlags = RIDEV_INPUTSINK;
rid[num].hwndTarget = mon->hMainWnd;
}
- rid[num].dwFlags |= RIDEV_NOHOTKEYS | (os_vista ? RIDEV_DEVNOTIFY : 0);
+ rid[num].dwFlags |= RIDEV_NOHOTKEYS | RIDEV_DEVNOTIFY;
}
num++;
rid[num].dwFlags = RIDEV_INPUTSINK;
rid[num].hwndTarget = mon->hMainWnd;
}
- rid[num].dwFlags |= (os_vista ? RIDEV_DEVNOTIFY : 0);
+ rid[num].dwFlags |= RIDEV_DEVNOTIFY;
}
num++;
rid[num].dwFlags = RIDEV_INPUTSINK;
rid[num].hwndTarget = mon->hMainWnd;
}
- rid[num].dwFlags |= (os_vista ? RIDEV_DEVNOTIFY : 0);
+ rid[num].dwFlags |= RIDEV_DEVNOTIFY;
}
num++;
}
}
winmousewheelbuttonstart = did->buttons;
if (i == 0) {
- did->axles = os_vista ? 4 : 3;
+ did->axles = 4;
did->axissort[0] = 0;
did->axisname[0] = my_strdup (_T("X Axis"));
did->axissort[1] = 1;
return false;
if (!rawinput_enabled_hid && !rawinput_enabled_hid_reset)
return false;
- if (!os_vista)
- return false;
return true;
}
rawinput_enabled_hid_reset = 0;
}
- if (!os_vista && rawinput_enabled_hid < 0)
- rawinput_enabled_hid = 0;
-
#if 0
IsXInputDevice(NULL);
#endif
detected = true;
- if (!os_win7)
- return 0;
-
if (!hd3d11)
hd3d11 = LoadLibrary(_T("D3D11.dll"));
if (!hdxgi)
HRESULT hr = pD3D11CreateDevice(NULL, currprefs.gfx_api_options == 0 ? D3D_DRIVER_TYPE_HARDWARE : D3D_DRIVER_TYPE_WARP,
NULL, cdflags, levels, 1, D3D11_SDK_VERSION, &m_device, NULL, &m_deviceContext);
if (FAILED(hr)) {
+ write_log(_T("D3D11 check failed. %08x\n"), hr);
return 0;
}
m_deviceContext->Release();
int v = fsdb_name_invalid_2x(n, dir);
if (v <= 1 || !aino)
return v;
- if (!os_win7)
- return 1;
TCHAR *p = build_nname(aino->nname, n);
HANDLE h = CreateFile(p, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, NULL);
DWORD err = -1;
}
if (!natmem_reserved) {
DWORD vaflags = MEM_RESERVE | MEM_WRITE_WATCH;
-#ifdef _WIN32
-#ifndef _WIN64
- if (!os_vista)
- vaflags |= MEM_TOP_DOWN;
-#endif
-#endif
for (;;) {
natmem_reserved = (uae_u8*)VirtualAlloc (NULL, natmem_size, vaflags, PAGE_READWRITE);
if (natmem_reserved)
{
if (!num_sound_devices) {
HMODULE l = NULL;
- if (os_vista && (sounddrivermask & SOUNDDRIVER_WASAPI)) {
+ if (sounddrivermask & SOUNDDRIVER_WASAPI) {
wasapi_enum(sound_devices);
}
- if ((1 || force_directsound || !os_vista) && (sounddrivermask & SOUNDDRIVER_DS)) {
+ if ((1 || force_directsound) && (sounddrivermask & SOUNDDRIVER_DS)) {
write_log(_T("Enumerating DirectSound devices..\n"));
DirectSoundEnumerate ((LPDSENUMCALLBACK)DSEnumProc, sound_devices);
DirectSoundCaptureEnumerate((LPDSENUMCALLBACK)DSEnumProc, record_devices);
static int set_master_volume (int volume, int mute)
{
- if (os_vista)
- return setget_master_volume_vista (1, &volume, &mute);
- else
- return setget_master_volume_xp (1, &volume, &mute);
+ return setget_master_volume_vista (1, &volume, &mute);
}
static int get_master_volume (int *volume, int *mute)
{
*volume = 0;
*mute = 0;
- if (os_vista)
- return setget_master_volume_vista (0, volume, mute);
- else
- return setget_master_volume_xp (0, volume, mute);
+ return setget_master_volume_vista (0, volume, mute);
}
void sound_mute (int newmute)
#endif
clipboard_active(mon->hAmigaWnd, 1);
#if USETHREADCHARACTERICS
- if (os_vista && AVTask == NULL) {
+ if (AVTask == NULL) {
typedef HANDLE(WINAPI* AVSETMMTHREADCHARACTERISTICS)(LPCTSTR, LPDWORD);
DWORD taskIndex = 0;
AVSETMMTHREADCHARACTERISTICS pAvSetMmThreadCharacteristics =
p->win32_commandpathstart[0] = 0;
p->win32_commandpathend[0] = 0;
p->win32_statusbar = 1;
- p->gfx_api = os_win7 ? 2 : (os_vista ? 1 : 0);
+ p->gfx_api = 2;
if (p->gfx_api > 1)
p->color_mode = 5;
if (p->gf[APMODE_NATIVE].gfx_filter == 0)
extern int sound_available;
extern TCHAR VersionStr[256];
extern TCHAR BetaStr[64];
-extern int os_admin, os_64bit, os_vista, os_win7, os_win8, os_win10, cpu_number, os_touch;
+extern int os_admin, os_64bit, os_win8, os_win10, cpu_number, os_touch;
extern BOOL os_dwm_enabled, dpi_aware_v2;
extern OSVERSIONINFO osVersion;
extern int paraport_mask;
static void adjustappbar(RECT *monitor, RECT *workrect)
{
- if (!os_vista)
- return;
APPBARDATA abd;
// Isn't this ugly API?
for (int i = 0; i < 4; i++) {
{
// XP does not support hybrid displays, don't load Direct3D
// Windows 10+ seems to use same names by default
- if (!os_vista || os_win10)
+ if (os_win10)
return;
IDirect3D9 *d3d = Direct3DCreate9 (D3D_SDK_VERSION);
if (!d3d)
typedef HRESULT (CALLBACK* DWMENABLEMMCSS)(BOOL);
static void setDwmEnableMMCSS (bool state)
{
- if (!os_vista)
- return;
HMODULE hm = GetModuleHandle(_T("dwmapi.dll"));
if (hm) {
DWMENABLEMMCSS pDwmEnableMMCSS;
RECT rc2;
GetClientRect(hListView, &rc2);
- if (!os_vista) {
-
- IMAGEINFO imf;
- POINT p;
- // For the first selected item,
- // we simply create a single-line drag image
- hDragImageList = ListView_CreateDragImage(hListView, iPos, &p);
- ImageList_GetImageInfo(hDragImageList, 0, &imf);
- width = imf.rcImage.right;
- height = imf.rcImage.bottom;
-
- } else {
-
- // ListView_CreateDragImage replacement hack follows..
- RECT rc;
- // Get Rectangle of selected ListView Item
- ListView_GetItemRect(hListView, iPos, &rc, LVIR_BOUNDS);
- if (rc.left < 0)
- rc.left = 0;
- if (rc.bottom < 0)
- rc.bottom = 0;
- width = rc.right - rc.left;
- height = rc.bottom - rc.top;
- if (width <= 0 || height <= 0)
- return 0;
- // Image becomes blank bar if visible part
- // is smaller than complete width of item.
- if (width > rc2.right - rc2.left)
- width = rc2.right - rc2.left;
- if (height > rc2.bottom - rc2.top)
- height = rc2.bottom - rc2.top;
-
- // Create HBITMAP of selected ListView Item
- HDC hDC = GetDC(hListView);
- if (hDC) {
- HDC hMemDC = CreateCompatibleDC(hDC);
- if (hMemDC) {
-
- HBITMAP hBMP = CreateCompatibleBitmap(hDC, width, height);
- if (hBMP) {
- HGDIOBJ o = SelectObject(hMemDC, hBMP);
- BitBlt(hMemDC, 0, 0, width, height, hDC, rc.left, rc.top, SRCCOPY);
- SelectObject(hMemDC, o);
- }
-
- // Create ImageList, add HBITMAP to ImageList.
- hDragImageList = ImageList_Create(width, height, ILC_COLOR24, 1, 1);
- if (hBMP && hDragImageList) {
- ImageList_Add(hDragImageList, hBMP, NULL);
- DeleteObject(hBMP);
- }
+ // ListView_CreateDragImage replacement hack follows..
+ RECT rc;
+ // Get Rectangle of selected ListView Item
+ ListView_GetItemRect(hListView, iPos, &rc, LVIR_BOUNDS);
+ if (rc.left < 0)
+ rc.left = 0;
+ if (rc.bottom < 0)
+ rc.bottom = 0;
+ width = rc.right - rc.left;
+ height = rc.bottom - rc.top;
+ if (width <= 0 || height <= 0)
+ return 0;
+ // Image becomes blank bar if visible part
+ // is smaller than complete width of item.
+ if (width > rc2.right - rc2.left)
+ width = rc2.right - rc2.left;
+ if (height > rc2.bottom - rc2.top)
+ height = rc2.bottom - rc2.top;
+
+ // Create HBITMAP of selected ListView Item
+ HDC hDC = GetDC(hListView);
+ if (hDC) {
+ HDC hMemDC = CreateCompatibleDC(hDC);
+ if (hMemDC) {
+
+ HBITMAP hBMP = CreateCompatibleBitmap(hDC, width, height);
+ if (hBMP) {
+ HGDIOBJ o = SelectObject(hMemDC, hBMP);
+ BitBlt(hMemDC, 0, 0, width, height, hDC, rc.left, rc.top, SRCCOPY);
+ SelectObject(hMemDC, o);
+ }
- DeleteDC(hMemDC);
+ // Create ImageList, add HBITMAP to ImageList.
+ hDragImageList = ImageList_Create(width, height, ILC_COLOR24, 1, 1);
+ if (hBMP && hDragImageList) {
+ ImageList_Add(hDragImageList, hBMP, NULL);
+ DeleteObject(hBMP);
}
- ReleaseDC(hListView, hDC);
+
+ DeleteDC(hMemDC);
}
+ ReleaseDC(hListView, hDC);
}
offset.x = rc2.left;
xSendDlgItemMessage (hDlg, IDC_ERRORLOGMESSAGE, EM_GETCHARFORMAT, 0, (LPARAM) & CharFormat);
CharFormat.dwMask |= CFM_SIZE | CFM_FACE;
CharFormat.yHeight = 8 * 20; /* height in twips, where a twip is 1/20th of a point - for a pt.size of 18 */
- _tcscpy (CharFormat.szFaceName, os_vista ? _T("Segoe UI") : _T("Tahoma"));
+ _tcscpy (CharFormat.szFaceName, _T("Segoe UI"));
xSendDlgItemMessage (hDlg, IDC_ERRORLOGMESSAGE, EM_SETCHARFORMAT, SCF_ALL, (LPARAM) & CharFormat);
return TRUE;
}
CharFormat.dwMask |= CFM_SIZE | CFM_FACE;
CharFormat.yHeight = 8 * 20; /* height in twips, where a twip is 1/20th of a point - for a pt.size of 18 */
- _tcscpy (CharFormat.szFaceName, os_vista ? _T("Segoe UI") : _T("Tahoma"));
+ _tcscpy (CharFormat.szFaceName, _T("Segoe UI"));
xSendDlgItemMessage (hDlg, IDC_CONTRIBUTORS, EM_SETCHARFORMAT, SCF_ALL, (LPARAM) & CharFormat);
return TRUE;
}
CharFormat.yHeight = 10 * 20; /* height in twips, where a twip is 1/20th of a point - for a pt.size of 18 */
CharFormat.crTextColor = GetSysColor (COLOR_ACTIVECAPTION);
- _tcscpy (CharFormat.szFaceName, os_vista ? _T("Segoe UI") : _T("Tahoma"));
+ _tcscpy (CharFormat.szFaceName, _T("Segoe UI"));
xSendDlgItemMessage (hDlg, url->id, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&CharFormat);
xSendDlgItemMessage (hDlg, url->id, EM_SETBKGNDCOLOR, 0, GetSysColor (COLOR_3DFACE));
}
CharFormat.dwEffects = CFE_BOLD;
CharFormat.yHeight = 24 * 20; /* height in twips, where a twip is 1/20th of a point */
- _tcscpy (CharFormat.szFaceName, os_vista ? _T("Segoe UI") : _T("Tahoma"));
+ _tcscpy (CharFormat.szFaceName, _T("Segoe UI"));
xSendDlgItemMessage (hDlg, IDC_RICHEDIT1, EM_SETCHARFORMAT, SCF_ALL, (LPARAM) & CharFormat);
xSendDlgItemMessage (hDlg, IDC_RICHEDIT1, EM_SETBKGNDCOLOR, 0, GetSysColor (COLOR_3DFACE));
xSendDlgItemMessage (hDlg, IDC_RICHEDIT2, EM_GETCHARFORMAT, 0, (LPARAM) & CharFormat);
CharFormat.dwMask |= CFM_SIZE | CFM_FACE;
CharFormat.yHeight = 12 * 20;
- _tcscpy (CharFormat.szFaceName, os_vista ? _T("Segoe UI") : _T("Tahoma"));
+ _tcscpy (CharFormat.szFaceName, _T("Segoe UI"));
xSendDlgItemMessage (hDlg, IDC_RICHEDIT2, EM_SETCHARFORMAT, SCF_ALL, (LPARAM) & CharFormat);
xSendDlgItemMessage (hDlg, IDC_RICHEDIT2, EM_SETBKGNDCOLOR, 0, GetSysColor (COLOR_3DFACE));
} DLGITEMTEMPLATEEX;
#include <poppack.h>
-static int font_vista_ok;
static const wchar_t wfont_vista[] = _T("Segoe UI");
-static const wchar_t wfont_xp[] = _T("Tahoma");
static const wchar_t wfont_old[] = _T("MS Sans Serif");
static const TCHAR font_vista[] = _T("Segoe UI");
-static const TCHAR font_xp[] = _T("Tahoma");
#define WNDS_DIALOGWINDOW 0X00010000
#define CW_USEDEFAULT16 ((short)0x8000)
{
if (!nr)
return;
- if (os_vista) {
- for (int i = 0; i < nr->setparamcnt; i++) {
- HWND hwnd = GetDlgItem(hDlg, nr->setparam_id[i]);
- if (hwnd) {
- int v = (int)SendMessage(hwnd, CB_GETITEMHEIGHT, -1, NULL);
- if (v > 0 && mmy(v) > v)
- SendMessage(hwnd, CB_SETITEMHEIGHT, -1, mmy(v));
- }
+ for (int i = 0; i < nr->setparamcnt; i++) {
+ HWND hwnd = GetDlgItem(hDlg, nr->setparam_id[i]);
+ if (hwnd) {
+ int v = (int)SendMessage(hwnd, CB_GETITEMHEIGHT, -1, NULL);
+ if (v > 0 && mmy(v) > v)
+ SendMessage(hwnd, CB_SETITEMHEIGHT, -1, mmy(v));
}
}
}
}
fontsize_default = fs;
- _tcscpy (fontname_gui, font_vista_ok ? wfont_vista : wfont_xp);
+ _tcscpy (fontname_gui, wfont_vista);
fontsize_gui = fontsize_default;
fontstyle_gui = 0;
fontweight_gui = FW_REGULAR;
- _tcscpy (fontname_list, font_vista_ok ? wfont_vista : wfont_xp);
+ _tcscpy (fontname_list, wfont_vista);
fontsize_list = fontsize_default;
fontstyle_list = 0;
fontweight_list = FW_REGULAR;
void scaleresource_init(const TCHAR *prefix, int fullscreen)
{
- if (os_vista)
- font_vista_ok = 1;
-
fontprefix = prefix;
setdeffont();
void getextendedframebounds(HWND hwnd, RECT *r)
{
- if (!pDwmGetWindowAttribute && !dwmapihandle && os_vista) {
+ if (!pDwmGetWindowAttribute && !dwmapihandle) {
dwmapihandle = LoadLibrary(_T("dwmapi.dll"));
if (dwmapihandle)
pDwmGetWindowAttribute = (DWMGETWINDOWATTRIBUTE)GetProcAddress(dwmapihandle, "DwmGetWindowAttribute");