Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 116061 | Differences between
and this patch

Collapse All | Expand All

(-)xglk/xg_internal.h~ (-1 / +5 lines)
Lines 4-10 Link Here
4
#include <stdio.h>
4
#include <stdio.h>
5
#include <X11/X.h>
5
#include <X11/X.h>
6
6
7
#ifdef GLK_MODULE_SOUND
7
#if defined(GLK_MODULE_SOUND) && !defined(NO_SDL_AVAILABLE)
8
#include <SDL.h>
8
#include <SDL.h>
9
#include <SDL_mixer.h>
9
#include <SDL_mixer.h>
10
#endif
10
#endif
Lines 19-25 Link Here
19
typedef struct glk_window_struct window_t;
19
typedef struct glk_window_struct window_t;
20
typedef struct glk_stream_struct stream_t;
20
typedef struct glk_stream_struct stream_t;
21
typedef struct glk_fileref_struct fileref_t;
21
typedef struct glk_fileref_struct fileref_t;
22
#ifndef NO_SDL_AVAILABLE
22
typedef struct glk_schannel_struct channel_t;
23
typedef struct glk_schannel_struct channel_t;
24
#endif
23
typedef struct stylehints_struct stylehints_t;
25
typedef struct stylehints_struct stylehints_t;
24
26
25
extern int gli_special_typable_table[keycode_MAXVAL+1];
27
extern int gli_special_typable_table[keycode_MAXVAL+1];
Lines 139-144 Link Here
139
141
140
extern int init_gli_filerefs(void);
142
extern int init_gli_filerefs(void);
141
143
144
#ifndef NO_SDL_AVAILABLE
142
/* --- Sound channels --- */
145
/* --- Sound channels --- */
143
146
144
struct glk_schannel_struct {
147
struct glk_schannel_struct {
Lines 168-173 Link Here
168
extern int init_gli_schannels(void);
171
extern int init_gli_schannels(void);
169
extern void exit_gli_schannels(void);
172
extern void exit_gli_schannels(void);
170
extern Bool gli_eventloop_schannels(void);
173
extern Bool gli_eventloop_schannels(void);
174
#endif
171
175
172
/* --- Styles --- */
176
/* --- Styles --- */
173
177
(-)xglk/xg_gestalt.c~ (+4 lines)
Lines 91-97 Link Here
91
  case gestalt_SoundVolume:
91
  case gestalt_SoundVolume:
92
  case gestalt_SoundNotify: 
92
  case gestalt_SoundNotify: 
93
  case gestalt_SoundMusic:
93
  case gestalt_SoundMusic:
94
#ifndef NO_SDL_AVAILABLE
94
    return TRUE;
95
    return TRUE;
96
#else
97
    return FALSE;
98
#endif
95
99
96
  case gestalt_Hyperlinks: {
100
  case gestalt_Hyperlinks: {
97
    return TRUE;
101
    return TRUE;
(-)xglk/xg_misc.c~ (+8 lines)
Lines 123-129 Link Here
123
    (*func)();
123
    (*func)();
124
  }
124
  }
125
125
126
#ifndef NO_SDL_AVAILABLE
126
  exit_gli_schannels();
127
  exit_gli_schannels();
128
#endif
127
129
128
  exit(1);
130
  exit(1);
129
}
131
}
Lines 135-141 Link Here
135
  window_t *win;
137
  window_t *win;
136
  stream_t *str;
138
  stream_t *str;
137
  fileref_t *fref;
139
  fileref_t *fref;
140
#ifndef NO_SDL_AVAILABLE
138
  channel_t *chan;
141
  channel_t *chan;
142
#endif
139
  
143
  
140
  gli_register_obj = reg;
144
  gli_register_obj = reg;
141
  gli_unregister_obj = unreg;
145
  gli_unregister_obj = unreg;
Lines 158-168 Link Here
158
	 fref = glk_fileref_iterate(fref, NULL)) {
162
	 fref = glk_fileref_iterate(fref, NULL)) {
159
      fref->disprock = (*gli_register_obj)(fref, gidisp_Class_Fileref);
163
      fref->disprock = (*gli_register_obj)(fref, gidisp_Class_Fileref);
160
    }
164
    }
165
#ifndef NO_SDL_AVAILABLE
161
    for (chan = glk_schannel_iterate(NULL, NULL);
166
    for (chan = glk_schannel_iterate(NULL, NULL);
162
	 chan;
167
	 chan;
163
	 chan = glk_schannel_iterate(chan, NULL)) {
168
	 chan = glk_schannel_iterate(chan, NULL)) {
164
      chan->disprock = (*gli_register_obj)(chan, gidisp_Class_Schannel);
169
      chan->disprock = (*gli_register_obj)(chan, gidisp_Class_Schannel);
165
    }
170
    }
171
#endif
166
  }
172
  }
167
}
173
}
168
174
Lines 184-191 Link Here
184
    return ((stream_t *)obj)->disprock;
190
    return ((stream_t *)obj)->disprock;
185
  case gidisp_Class_Fileref:
191
  case gidisp_Class_Fileref:
186
    return ((fileref_t *)obj)->disprock;
192
    return ((fileref_t *)obj)->disprock;
193
#ifndef NO_SDL_AVAILABLE
187
  case gidisp_Class_Schannel:
194
  case gidisp_Class_Schannel:
188
    return ((channel_t *)obj)->disprock;
195
    return ((channel_t *)obj)->disprock;
196
#endif
189
  default: {
197
  default: {
190
      gidispatch_rock_t dummy;
198
      gidispatch_rock_t dummy;
191
      dummy.num = 0;
199
      dummy.num = 0;
(-)xglk/xglk.c~ (+2 lines)
Lines 58-65 Link Here
58
    return FALSE;
58
    return FALSE;
59
  if (!init_gli_filerefs())
59
  if (!init_gli_filerefs())
60
    return FALSE;
60
    return FALSE;
61
#ifndef NO_SDL_AVAILABLE
61
  if (!init_gli_schannels())
62
  if (!init_gli_schannels())
62
    return FALSE;
63
    return FALSE;
64
#endif
63
  if (!init_gli_windows())
65
  if (!init_gli_windows())
64
    return FALSE;
66
    return FALSE;
65
67
(-)xglk/xglk_loop.c~ (+2 lines)
Lines 78-85 Link Here
78
78
79
  while (ev->type == evtype_None) {
79
  while (ev->type == evtype_None) {
80
80
81
#ifndef NO_SDL_AVAILABLE
81
    if (gli_eventloop_schannels())
82
    if (gli_eventloop_schannels())
82
      continue;
83
      continue;
84
#endif
83
85
84
    if (xio_any_invalid) {
86
    if (xio_any_invalid) {
85
      xglk_redraw();
87
      xglk_redraw();
(-)xglk/xg_schan.c~ (+56 lines)
Lines 13-18 Link Here
13
13
14
#ifdef GLK_MODULE_SOUND
14
#ifdef GLK_MODULE_SOUND
15
15
16
#ifndef NO_SDL_AVAILABLE
17
16
#define DEBUG_MODULE_SOUND 0
18
#define DEBUG_MODULE_SOUND 0
17
19
18
#include "gi_blorb.h"
20
#include "gi_blorb.h"
Lines 401-404 Link Here
401
  /* I doubt this will make much difference, so make it a no-op for now. */
403
  /* I doubt this will make much difference, so make it a no-op for now. */
402
}
404
}
403
405
406
#else
407
408
schanid_t glk_schannel_create(glui32 rock)
409
{
410
  return NULL;
411
}
412
413
void glk_schannel_destroy(schanid_t chan)
414
{
415
}
416
417
schanid_t glk_schannel_iterate(schanid_t chan, glui32 *rockptr)
418
{
419
  if (rockptr)
420
    *rockptr = 0;
421
  return NULL;
422
}
423
424
glui32 glk_schannel_get_rock(schanid_t chan)
425
{
426
  gli_strict_warning("schannel_get_rock: invalid id.");
427
  return 0;
428
}
429
430
glui32 glk_schannel_play(schanid_t chan, glui32 snd)
431
{
432
  gli_strict_warning("schannel_play: invalid id.");
433
  return 0;
434
}
435
436
glui32 glk_schannel_play_ext(schanid_t chan, glui32 snd, glui32 repeats,
437
    glui32 notify)
438
{
439
  gli_strict_warning("schannel_play_ext: invalid id.");
440
  return 0;
441
}
442
443
void glk_schannel_stop(schanid_t chan)
444
{
445
  gli_strict_warning("schannel_stop: invalid id.");
446
}
447
448
void glk_schannel_set_volume(schanid_t chan, glui32 vol)
449
{
450
  gli_strict_warning("schannel_set_volume: invalid id.");
451
}
452
453
void glk_sound_load_hint(glui32 snd, glui32 flag)
454
{
455
  gli_strict_warning("schannel_sound_load_hint: invalid id.");
456
}
457
458
#endif
459
404
#endif /* GLK_MODULE_SOUND */
460
#endif /* GLK_MODULE_SOUND */

Return to bug 116061