ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/BeOS/xpram_beos.cpp
(Generate patch)

Comparing BasiliskII/src/BeOS/xpram_beos.cpp (file contents):
Revision 1.1.1.1 by cebix, 1999-10-03T14:16:25Z vs.
Revision 1.10 by asvitkine, 2009-07-23T19:19:14Z

# Line 1 | Line 1
1   /*
2   *  xpram_beos.cpp - XPRAM handling, BeOS specific stuff
3   *
4 < *  Basilisk II (C) 1997-1999 Christian Bauer
4 > *  Basilisk II (C) 1997-2008 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 26 | Line 26
26  
27  
28   // XPRAM file name and path
29 + #if POWERPC_ROM
30 + const char XPRAM_FILE_NAME[] = "SheepShaver_NVRAM";
31 + #else
32   const char XPRAM_FILE_NAME[] = "BasiliskII_XPRAM";
33 + #endif
34   static BPath xpram_path;
35  
36  
# Line 34 | Line 38 | static BPath xpram_path;
38   *  Load XPRAM from settings file
39   */
40  
41 < void LoadXPRAM(void)
41 > void LoadXPRAM(const char *vmdir)
42   {
43          // Construct XPRAM path
44          find_directory(B_USER_SETTINGS_DIRECTORY, &xpram_path, true);
# Line 43 | Line 47 | void LoadXPRAM(void)
47          // Load XPRAM from settings file
48          int fd;
49          if ((fd = open(xpram_path.Path(), O_RDONLY)) >= 0) {
50 <                read(fd, XPRAM, 256);
50 >                read(fd, XPRAM, XPRAM_SIZE);
51                  close(fd);
52          }
53   }
# Line 58 | Line 62 | void SaveXPRAM(void)
62          if (xpram_path.InitCheck() != B_NO_ERROR)
63                  return;
64          int fd;
65 <        if ((fd = open(xpram_path.Path(), O_WRONLY | O_CREAT, 0664)) >= 0) {
66 <                write(fd, XPRAM, 256);
65 >        if ((fd = open(xpram_path.Path(), O_WRONLY | O_CREAT, 0666)) >= 0) {
66 >                write(fd, XPRAM, XPRAM_SIZE);
67                  close(fd);
68          }
69   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines