mirror of
https://github.com/holub/mame
synced 2025-06-30 16:00:01 +03:00
-osd/windows/winutil.cpp: Better way to get module handle.
* This was leftover support for Windows 2000 and earlier that hadn't been cleaned up. -atari: Don't forget your #include guards!
This commit is contained in:
parent
fd6c192c2e
commit
6f93428f96
@ -6,6 +6,10 @@
|
|||||||
Sky Diver Audio
|
Sky Diver Audio
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
#ifndef MAME_ATARI_SKYDIVER_A_H
|
||||||
|
#define MAME_ATARI_SKYDIVER_A_H
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include "sound/discrete.h"
|
#include "sound/discrete.h"
|
||||||
|
|
||||||
@ -24,3 +28,5 @@ Sky Diver Audio
|
|||||||
|
|
||||||
|
|
||||||
DISCRETE_SOUND_EXTERN( skydiver_discrete );
|
DISCRETE_SOUND_EXTERN( skydiver_discrete );
|
||||||
|
|
||||||
|
#endif // MAME_ATARI_SKYDIVER_A_H
|
||||||
|
@ -6,6 +6,10 @@
|
|||||||
Sky Raider Audio
|
Sky Raider Audio
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
#ifndef MAME_ATARI_SKYRAID_A_H
|
||||||
|
#define MAME_ATARI_SKYRAID_A_H
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include "sound/discrete.h"
|
#include "sound/discrete.h"
|
||||||
|
|
||||||
@ -20,3 +24,5 @@ Sky Raider Audio
|
|||||||
|
|
||||||
|
|
||||||
DISCRETE_SOUND_EXTERN( skyraid_discrete );
|
DISCRETE_SOUND_EXTERN( skyraid_discrete );
|
||||||
|
|
||||||
|
#endif // MAME_ATARI_SKYRAID_A_H
|
||||||
|
@ -6,6 +6,10 @@
|
|||||||
Sprint 2 / Sprint 1 / Dominos Audio
|
Sprint 2 / Sprint 1 / Dominos Audio
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
#ifndef MAME_ATARI_SPRINT2_A_H
|
||||||
|
#define MAME_ATARI_SPRINT2_A_H
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include "sound/discrete.h"
|
#include "sound/discrete.h"
|
||||||
|
|
||||||
@ -28,3 +32,5 @@ Sprint 2 / Sprint 1 / Dominos Audio
|
|||||||
DISCRETE_SOUND_EXTERN( sprint2_discrete );
|
DISCRETE_SOUND_EXTERN( sprint2_discrete );
|
||||||
DISCRETE_SOUND_EXTERN( sprint1_discrete );
|
DISCRETE_SOUND_EXTERN( sprint1_discrete );
|
||||||
DISCRETE_SOUND_EXTERN( dominos_discrete );
|
DISCRETE_SOUND_EXTERN( dominos_discrete );
|
||||||
|
|
||||||
|
#endif // MAME_ATARI_SPRINT2_A_H
|
||||||
|
@ -6,6 +6,10 @@
|
|||||||
Sprint 8 Audio
|
Sprint 8 Audio
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
#ifndef MAME_ATARI_SPRINT8_A_H
|
||||||
|
#define MAME_ATARI_SPRINT8_A_H
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include "sound/discrete.h"
|
#include "sound/discrete.h"
|
||||||
|
|
||||||
@ -25,3 +29,5 @@ Sprint 8 Audio
|
|||||||
|
|
||||||
|
|
||||||
DISCRETE_SOUND_EXTERN( sprint8_discrete );
|
DISCRETE_SOUND_EXTERN( sprint8_discrete );
|
||||||
|
|
||||||
|
#endif // MAME_ATARI_SPRINT8_A_H
|
||||||
|
@ -821,9 +821,9 @@ GFXDECODE_END
|
|||||||
|
|
||||||
void starshp1_state::starshp1(machine_config &config)
|
void starshp1_state::starshp1(machine_config &config)
|
||||||
{
|
{
|
||||||
static constexpr XTAL MASTER_CLOCK = 12.096_MHz_XTAL;
|
constexpr XTAL MASTER_CLOCK = 12.096_MHz_XTAL;
|
||||||
static constexpr XTAL CPU_CLOCK = MASTER_CLOCK / 16;
|
constexpr XTAL CPU_CLOCK = MASTER_CLOCK / 16;
|
||||||
static constexpr XTAL PIXEL_CLOCK = MASTER_CLOCK;
|
constexpr XTAL PIXEL_CLOCK = MASTER_CLOCK;
|
||||||
|
|
||||||
// basic machine hardware
|
// basic machine hardware
|
||||||
|
|
||||||
@ -843,12 +843,12 @@ void starshp1_state::starshp1(machine_config &config)
|
|||||||
|
|
||||||
// video hardware
|
// video hardware
|
||||||
|
|
||||||
static constexpr int HTOTAL = 0x300;
|
constexpr int HTOTAL = 0x300;
|
||||||
static constexpr int HBEND = 0x000;
|
constexpr int HBEND = 0x000;
|
||||||
static constexpr int HBSTART = 0x200;
|
constexpr int HBSTART = 0x200;
|
||||||
static constexpr int VTOTAL = 0x106;
|
constexpr int VTOTAL = 0x106;
|
||||||
static constexpr int VBEND = 0x000;
|
constexpr int VBEND = 0x000;
|
||||||
static constexpr int VBSTART = 0x0f0;
|
constexpr int VBSTART = 0x0f0;
|
||||||
|
|
||||||
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
|
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
|
||||||
m_screen->set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART);
|
m_screen->set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART);
|
||||||
|
@ -6,6 +6,10 @@
|
|||||||
Starship 1 Audio
|
Starship 1 Audio
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
#ifndef MAME_ATARI_STARSHP1_A_H
|
||||||
|
#define MAME_ATARI_STARSHP1_A_H
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include "sound/discrete.h"
|
#include "sound/discrete.h"
|
||||||
|
|
||||||
@ -24,3 +28,5 @@ Starship 1 Audio
|
|||||||
|
|
||||||
|
|
||||||
DISCRETE_SOUND_EXTERN( starshp1_discrete );
|
DISCRETE_SOUND_EXTERN( starshp1_discrete );
|
||||||
|
|
||||||
|
#endif // MAME_ATARI_STARSHP1_A_H
|
||||||
|
@ -6,6 +6,10 @@
|
|||||||
Subs Audio
|
Subs Audio
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
#ifndef MAME_ATARI_SUBS_A_H
|
||||||
|
#define MAME_ATARI_SUBS_A_H
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include "sound/discrete.h"
|
#include "sound/discrete.h"
|
||||||
|
|
||||||
@ -21,3 +25,5 @@ Subs Audio
|
|||||||
|
|
||||||
|
|
||||||
DISCRETE_SOUND_EXTERN( subs_discrete );
|
DISCRETE_SOUND_EXTERN( subs_discrete );
|
||||||
|
|
||||||
|
#endif // MAME_ATARI_SUBS_A_H
|
||||||
|
@ -6,6 +6,10 @@
|
|||||||
Tank 8 Audio
|
Tank 8 Audio
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
#ifndef MAME_ATARI_TANK8_A_H
|
||||||
|
#define MAME_ATARI_TANK8_A_H
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include "sound/discrete.h"
|
#include "sound/discrete.h"
|
||||||
|
|
||||||
@ -28,3 +32,5 @@ Tank 8 Audio
|
|||||||
|
|
||||||
|
|
||||||
DISCRETE_SOUND_EXTERN( tank8_discrete );
|
DISCRETE_SOUND_EXTERN( tank8_discrete );
|
||||||
|
|
||||||
|
#endif // MAME_ATARI_TANK8_A_H
|
||||||
|
@ -10,8 +10,6 @@
|
|||||||
|
|
||||||
#include "triplhnt_a.h"
|
#include "triplhnt_a.h"
|
||||||
|
|
||||||
#include "sound/discrete.h"
|
|
||||||
|
|
||||||
|
|
||||||
const char *const triplhnt_sample_names[] =
|
const char *const triplhnt_sample_names[] =
|
||||||
{
|
{
|
||||||
|
@ -6,6 +6,10 @@
|
|||||||
Triple Hunt Audio
|
Triple Hunt Audio
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
#ifndef MAME_ATARI_TRIPLHNT_A_H
|
||||||
|
#define MAME_ATARI_TRIPLHNT_A_H
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include "sound/discrete.h"
|
#include "sound/discrete.h"
|
||||||
|
|
||||||
@ -20,3 +24,5 @@ Triple Hunt Audio
|
|||||||
|
|
||||||
DISCRETE_SOUND_EXTERN( triplhnt_discrete );
|
DISCRETE_SOUND_EXTERN( triplhnt_discrete );
|
||||||
extern const char *const triplhnt_sample_names[];
|
extern const char *const triplhnt_sample_names[];
|
||||||
|
|
||||||
|
#endif // MAME_ATARI_TRIPLHNT_A_H
|
||||||
|
@ -6,6 +6,10 @@
|
|||||||
Video Pinball Audio
|
Video Pinball Audio
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
#ifndef MAME_ATARI_VIDEOPIN_A_H
|
||||||
|
#define MAME_ATARI_VIDEOPIN_A_H
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include "sound/discrete.h"
|
#include "sound/discrete.h"
|
||||||
|
|
||||||
@ -20,3 +24,5 @@ Video Pinball Audio
|
|||||||
|
|
||||||
|
|
||||||
DISCRETE_SOUND_EXTERN( videopin_discrete );
|
DISCRETE_SOUND_EXTERN( videopin_discrete );
|
||||||
|
|
||||||
|
#endif // MAME_ATARI_VIDEOPIN_A_H
|
||||||
|
@ -25,8 +25,8 @@
|
|||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include <dinput.h>
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include <dinput.h>
|
||||||
#include <wrl/client.h>
|
#include <wrl/client.h>
|
||||||
|
|
||||||
|
|
||||||
|
@ -125,9 +125,12 @@ std::string osd_subst_env(std::string_view src)
|
|||||||
|
|
||||||
HMODULE WINAPI GetModuleHandleUni()
|
HMODULE WINAPI GetModuleHandleUni()
|
||||||
{
|
{
|
||||||
MEMORY_BASIC_INFORMATION mbi;
|
HMODULE result = nullptr;
|
||||||
VirtualQuery((LPCVOID)GetModuleHandleUni, &mbi, sizeof(mbi));
|
BOOL const succeeded = GetModuleHandleEx(
|
||||||
return (HMODULE)mbi.AllocationBase;
|
GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT | GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS,
|
||||||
|
LPCWSTR(uintptr_t(&GetModuleHandleUni)),
|
||||||
|
&result);
|
||||||
|
return succeeded ? result : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user