summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2026-02-01 16:32:21 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2026-02-01 16:32:21 +0100
commite0405d2135939d08289205e3a38df329076e16c1 (patch)
tree4d4facf614ba6062a2df194bd14d2f99021cfad7 /test
parent4be596a30673a67ee7d5a0bdc8095922a498eed5 (diff)
macOS: remove code present only to support macOS versions 10.3 and 10.4.
This is a first step towards removing the code related to support of old macOS versions that are not compatible with C++11 which FLTK 1.5 requires.
Diffstat (limited to 'test')
-rw-r--r--test/blocks.cxx17
-rw-r--r--test/sudoku.cxx14
2 files changed, 2 insertions, 29 deletions
diff --git a/test/blocks.cxx b/test/blocks.cxx
index b2ab76435..8b943b734 100644
--- a/test/blocks.cxx
+++ b/test/blocks.cxx
@@ -1,7 +1,7 @@
//
// "Block Attack!" scrolling blocks game using the Fast Light Tool Kit (FLTK).
//
-// Copyright © 2006-2021 by Michael Sweet.
+// Copyright © 2006-2026 by Michael Sweet.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -150,12 +150,7 @@ class BlockSound {
// Private, OS-specific data...
#ifdef __APPLE__
AudioDeviceID device;
-#ifndef MAC_OS_X_VERSION_10_5
-#define MAC_OS_X_VERSION_10_5 1050
-#endif
-# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
AudioDeviceIOProcID audio_proc_id;
-# endif
AudioStreamBasicDescription format;
short *data;
int remaining;
@@ -225,13 +220,8 @@ BlockSound::BlockSound() {
if (format.mFormatID != kAudioFormatLinearPCM) return;
// Attach the callback and start the device
-# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
if (AudioDeviceCreateIOProcID(device, audio_cb, (void *)this, &audio_proc_id) != noErr) return;
AudioDeviceStart(device, audio_proc_id);
-# else
- if (AudioDeviceAddIOProc(device, audio_cb, (void *)this) != noErr) return;
- AudioDeviceStart(device, audio_cb);
-# endif
sample_size = (int)format.mSampleRate;
@@ -323,13 +313,8 @@ BlockSound::BlockSound() {
BlockSound::~BlockSound() {
#ifdef __APPLE__
if (sample_size) {
-# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
AudioDeviceStop(device, audio_proc_id);
AudioDeviceDestroyIOProcID(device, audio_proc_id);
-# else
- AudioDeviceStop(device, audio_cb);
- AudioDeviceRemoveIOProc(device, audio_cb);
-# endif
}
#elif defined(_WIN32)
diff --git a/test/sudoku.cxx b/test/sudoku.cxx
index c0d6bfd43..f6e78c170 100644
--- a/test/sudoku.cxx
+++ b/test/sudoku.cxx
@@ -2,7 +2,7 @@
// Sudoku game using the Fast Light Tool Kit (FLTK).
//
// Copyright 2005-2018 by Michael Sweet.
-// Copyright 2019-2021 by Bill Spitzak and others.
+// Copyright 2019-2026 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -90,9 +90,7 @@ class SudokuSound {
// Private, OS-specific data...
#ifdef __APPLE__
AudioDeviceID device;
-# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
AudioDeviceIOProcID audio_proc_id;
-# endif
AudioStreamBasicDescription format;
short *data;
int remaining;
@@ -263,13 +261,8 @@ SudokuSound::SudokuSound() {
if (format.mFormatID != kAudioFormatLinearPCM) return;
// Attach the callback and start the device
-# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
if (AudioDeviceCreateIOProcID(device, audio_cb, (void *)this, &audio_proc_id) != noErr) return;
AudioDeviceStart(device, audio_proc_id);
-# else
- if (AudioDeviceAddIOProc(device, audio_cb, (void *)this) != noErr) return;
- AudioDeviceStart(device, audio_cb);
-# endif
sample_size = (int)format.mSampleRate / 20;
@@ -369,13 +362,8 @@ SudokuSound::SudokuSound() {
SudokuSound::~SudokuSound() {
#ifdef __APPLE__
if (sample_size) {
-# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
AudioDeviceStop(device, audio_proc_id);
AudioDeviceDestroyIOProcID(device, audio_proc_id);
-# else
- AudioDeviceStop(device, audio_cb);
- AudioDeviceRemoveIOProc(device, audio_cb);
-# endif
}
#elif defined(_WIN32)